From e5ed7a7eb7d2eb0087462ea64e14092151139262 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 17 Oct 2019 12:25:36 +0300 Subject: [PATCH] io: fix lintian suggestions in test code golint: pkg/io/binaryrw_test.go:25:11: should omit type []byte from declaration of var bin; it will be inferred from the right-hand side pkg/io/binaryrw_test.go:42:11: should omit type []byte from declaration of var bin; it will be inferred from the right-hand side pkg/io/binaryrw_test.go:118:7: should omit type string from declaration of var str; it will be inferred from the right-hand side --- pkg/io/binaryrw_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/io/binaryrw_test.go b/pkg/io/binaryrw_test.go index dc69a92c4..1c147f8bf 100644 --- a/pkg/io/binaryrw_test.go +++ b/pkg/io/binaryrw_test.go @@ -22,7 +22,7 @@ func TestWriteLE(t *testing.T) { var ( val uint32 = 0xdeadbeef readval uint32 - bin []byte = []byte{0xef, 0xbe, 0xad, 0xde} + bin = []byte{0xef, 0xbe, 0xad, 0xde} ) bw := NewBufBinWriter() bw.WriteLE(val) @@ -39,7 +39,7 @@ func TestWriteBE(t *testing.T) { var ( val uint32 = 0xdeadbeef readval uint32 - bin []byte = []byte{0xde, 0xad, 0xbe, 0xef} + bin = []byte{0xde, 0xad, 0xbe, 0xef} ) bw := NewBufBinWriter() bw.WriteBE(val) @@ -115,7 +115,7 @@ func TestBufBinWriterReset(t *testing.T) { func TestWriteString(t *testing.T) { var ( - str string = "teststring" + str = "teststring" ) bw := NewBufBinWriter() bw.WriteString(str)