From 2967ba7def0e296ee9f3b4fded72cbfc50b9a3e6 Mon Sep 17 00:00:00 2001 From: Takuo Kitame Date: Sun, 12 Feb 2023 08:21:36 +0000 Subject: [PATCH] fix(ci): fix lint errors --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 21331ea..c451770 100644 --- a/main.go +++ b/main.go @@ -39,7 +39,7 @@ type Data struct { // initialize and prepare the device func prepareDevice(p serial.Port, s *bufio.Scanner) error { logInfo("Prepare device...:") - defer logPrint("\n") + defer logPrintln("") for _, c := range []string{"STP", "ID?", "STA"} { logPrintf(" %v", c) if _, err := p.Write([]byte(c + "\r\n")); err != nil { @@ -84,7 +84,7 @@ func main() { defer func() { port.Write([]byte("STP\r\n")); time.Sleep(time.Millisecond * 100); port.Close() }() // serial reader - port.SetReadTimeout(time.Duration(time.Second * 10)) + port.SetReadTimeout(time.Second * 10) s := bufio.NewScanner(port) s.Split(bufio.ScanLines)