From fe4faf5a59d051fbcd9fb62cf104e56ae6df1f15 Mon Sep 17 00:00:00 2001 From: fengzhiqiang Date: Tue, 29 Dec 2020 11:28:10 +0800 Subject: [PATCH] disable verbose --- go.mod | 1 + go.sum | 2 ++ utils/serial.go | 1 + utils/telegram.go | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2752045..759677a 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/magiconair/properties v1.8.4 // indirect github.com/mattn/go-sqlite3 v1.14.5 github.com/mitchellh/mapstructure v1.4.0 // indirect + github.com/nsf/gocode v0.0.0-20190302080247-5bee97b48836 // indirect github.com/pelletier/go-toml v1.8.1 // indirect github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect diff --git a/go.sum b/go.sum index 6a8c7df..5c81a6b 100644 --- a/go.sum +++ b/go.sum @@ -145,6 +145,8 @@ github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nsf/gocode v0.0.0-20190302080247-5bee97b48836 h1:oc3CL18CoGhyOQJ7HDa9gJAde33bwI8Vi28zLdIzJVc= +github.com/nsf/gocode v0.0.0-20190302080247-5bee97b48836/go.mod h1:6Q8/OMaaKAgTX7/jt2bOXVDrm1eJhoNd+iwzghR7jvs= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= diff --git a/utils/serial.go b/utils/serial.go index 2cda036..5f646e8 100644 --- a/utils/serial.go +++ b/utils/serial.go @@ -29,6 +29,7 @@ func OpenPort(device string, baudrate int, bytesize byte, stopbits byte) error { zap.Int("stopbits", int(stopbits))) sp = serial.New() sp.EOL('\r') + sp.Verbose = false err := sp.Open(device, baudrate, time.Second*3) Log.Info("open ", zap.String("device", device), zap.Error(err)) if err == nil { diff --git a/utils/telegram.go b/utils/telegram.go index 5f51310..44b4493 100644 --- a/utils/telegram.go +++ b/utils/telegram.go @@ -16,7 +16,7 @@ var buffer string var RawLog *rotatelogs.RotateLogs func Append(data string) bool { - buffer = buffer + data + buffer = buffer + data + "\n" return check() }