From 4bf93ca9911052f35e6f93f27a6f71c45b17c0b7 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 8 May 2019 18:17:07 +0800 Subject: [PATCH] typos --- sql.go | 16 ++++++++-------- workers.go | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sql.go b/sql.go index b3f0d57..9e4b618 100644 --- a/sql.go +++ b/sql.go @@ -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++ } diff --git a/workers.go b/workers.go index 56c71be..e2be889 100644 --- a/workers.go +++ b/workers.go @@ -5,6 +5,7 @@ import ( "log" "regexp" "strconv" + "time" "github.com/streadway/amqp" )