This commit is contained in:
shoopea 2019-12-29 20:51:08 +08:00
parent 123fff4747
commit 511d1364d7

View File

@ -18,16 +18,16 @@ func resetMsgParsingRules2() error {
err = json.Unmarshal(b, &rules) err = json.Unmarshal(b, &rules)
for _, r := range rules { for k, _ := range rules {
// b, err := json.Marshal(r) // b, err := json.Marshal(r)
// log.Printf("Rule : %s\n", string(b)) // log.Printf("Rule : %s\n", string(b))
id, err := codeObjSubTypeId(r.MsgType)
r := rules[k]
r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType) r.MsgTypeID64, err = codeObjSubTypeId(r.MsgType)
logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")") logOnError(err, "resetMsgParsingRules2 : codeObjSubTypeId("+r.MsgType+")")
if err != nil { if err != nil {
return err return err
} else {
log.Printf("codeObjSubTypeId("+r.MsgType+") : %d / %d\n", id, r.MsgTypeID64)
} }
r.re, err = regexp.Compile(r.Rule) r.re, err = regexp.Compile(r.Rule)