This commit is contained in:
shoopea 2019-12-29 19:46:07 +08:00
parent 386650df9b
commit 63d5603008

View File

@ -38,14 +38,14 @@ func resetMsgParsingRules2() error {
stmt, err := db.Prepare(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule)
VALUES (?, ?, ?, ?);`)
logOnError(errm "resetMsgParsingRules2 : prepare statement")
logOnError(err, "resetMsgParsingRules2 : prepare statement")
if err != nil {
return err
}
defer stmt.Close()
for r := range rules {
_, err = stmt.Exec(r.Priority, r.MsgTypeID64, r.Description, r.Rule)
logOnError(err, "resetMsgParsingRules2 : insert statement " + r.Description)
logOnError(err, "resetMsgParsingRules2 : insert statement "+r.Description)
if err != nil {
return err
}