From c498c72fb1ca0c8c634a9d2ed5dd984333516976 Mon Sep 17 00:00:00 2001 From: Jean-Marc MEESSEN Date: Thu, 11 Jun 2020 22:08:29 +0200 Subject: [PATCH] Move the regexp as a global var --- cmd/parse_line.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/parse_line.go b/cmd/parse_line.go index c7baa54..b7f18f5 100644 --- a/cmd/parse_line.go +++ b/cmd/parse_line.go @@ -40,11 +40,11 @@ type LogLine struct { QSLmsg string } +var regexpIsBand = regexp.MustCompile("m$") // ParseLine cuts a FLE line into useful bits func ParseLine(inputStr string, previousLine LogLine) (logLine LogLine, errorMsg string){ //TODO: input null protection? - regexpIsBand, _ := regexp.Compile("m$") logLine = previousLine