This commit is contained in:
shoopea 2019-05-08 18:17:07 +08:00
parent 5fdb6747e9
commit 4bf93ca991
2 changed files with 9 additions and 8 deletions

16
sql.go
View File

@ -297,17 +297,17 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) {
defer rules.Close()
for rules.Next() {
err = classifs.Scan(&id, &priority, &descn, &rule, &msgTypeID)
err = rules.Scan(&id, &priority, &descn, &rule, &msgTypeID)
if err != nil {
return m, err
}
rule := new(MessageParsingRule)
rule.ID = id
rule.Priority = priority
rule.Description = descn
rule.Rule = rule
rule.MsgTypeID = msgTypeID
m[count] = *rule
i := new(MessageParsingRule)
i.ID = id
i.Priority = priority
i.Description = descn
i.Rule = rule
i.MsgTypeID = msgTypeID
m[count] = *i
count++
}

View File

@ -5,6 +5,7 @@ import (
"log"
"regexp"
"strconv"
"time"
"github.com/streadway/amqp"
)