Add go modules; fix a linting warning
authorMikael Berthe <mikael@lilotux.net>
Sat, 13 Mar 2021 19:31:49 +0100
changeset 27 e882f78c302e
parent 26 a8138193a9bb
child 28 3f39d3cd68ce
Add go modules; fix a linting warning
go.mod
go.sum
gobm65.go
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/go.mod	Sat Mar 13 19:31:49 2021 +0100
@@ -0,0 +1,9 @@
+module gobm65
+
+go 1.16
+
+require (
+	github.com/spf13/pflag v1.0.5
+	github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
+	golang.org/x/sys v0.0.0-20210313110737-8e9fff1a3a18 // indirect
+)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/go.sum	Sat Mar 13 19:31:49 2021 +0100
@@ -0,0 +1,6 @@
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07 h1:UyzmZLoiDWMRywV4DUYb9Fbt8uiOSooupjTq10vpvnU=
+github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
+golang.org/x/sys v0.0.0-20210313110737-8e9fff1a3a18 h1:jxr7/dEo+rR29uEBoLSWJ1tRHCFAMwFbGUU9nRqzpds=
+golang.org/x/sys v0.0.0-20210313110737-8e9fff1a3a18/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
--- a/gobm65.go	Sat Apr 07 21:27:59 2018 +0200
+++ b/gobm65.go	Sat Mar 13 19:31:49 2021 +0100
@@ -129,7 +129,7 @@
 			return t, err
 		}
 		//log.Printf("(%d bytes) %q\n", n, b[t:t+1])
-		t = t + n
+		t += n
 	}
 	return t, nil
 }