From c7130dffe6853a0bb6bfa766f0df09ae1e0f5611 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 21 Jun 2020 16:33:13 +0200 Subject: [PATCH] tet --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0951f39..6cb4641 100644 --- a/main.go +++ b/main.go @@ -194,9 +194,11 @@ func main() { if ok { clt := Client{} r, _ := regexp.Compile("Client #(?P[0-9]+) name: '(?P.*)' company: (?P[0-9]+) IP: (?P
.*)") - clt.ClientID, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${ClientID}"), 10, 32) + ID64, _ := strconv.ParseInt(r.ReplaceAllString(sp.Output, "${ClientID}"), 10, 32) + clt.ClientID = uint32(ID64) clt.Name = r.ReplaceAllString(sp.Output, "${ClientID}") - clt.CompanyID, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${CompanyID}"), 10, 8) + ID64, _ = strconv.ParseInt(r.ReplaceAllString(sp.Output, "${CompanyID}"), 10, 8) + clt.CompanyID = uint8(ID64) clt.Address = r.ReplaceAllString(sp.Output, "${Address}") clients[clt.ClientID] = clt }