From b37ca8547bccac09e903ae02a400c56662c7ac68 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 8 May 2019 18:47:32 +0800 Subject: [PATCH] test --- sql.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql.go b/sql.go index a942734..ca1e347 100644 --- a/sql.go +++ b/sql.go @@ -3,6 +3,7 @@ package main import ( "errors" "log" + "regexp" "strconv" ) @@ -287,6 +288,8 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) { msgTypeID int32 ) + log.Println("Loading message parsing rules...") + m := make(map[int]MessageParsingRule) count := int(0) @@ -307,6 +310,7 @@ func loadMsgParsingRules() (map[int]MessageParsingRule, error) { i.Description = descn i.Rule = rule i.MsgTypeID = msgTypeID + i.re = regexp.MustCompile(rule) m[count] = *i count++