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
This commit is contained in:
Roman Khimov 2019-10-17 12:25:36 +03:00
parent 6029d5a888
commit e5ed7a7eb7

View file

@ -22,7 +22,7 @@ func TestWriteLE(t *testing.T) {
var ( var (
val uint32 = 0xdeadbeef val uint32 = 0xdeadbeef
readval uint32 readval uint32
bin []byte = []byte{0xef, 0xbe, 0xad, 0xde} bin = []byte{0xef, 0xbe, 0xad, 0xde}
) )
bw := NewBufBinWriter() bw := NewBufBinWriter()
bw.WriteLE(val) bw.WriteLE(val)
@ -39,7 +39,7 @@ func TestWriteBE(t *testing.T) {
var ( var (
val uint32 = 0xdeadbeef val uint32 = 0xdeadbeef
readval uint32 readval uint32
bin []byte = []byte{0xde, 0xad, 0xbe, 0xef} bin = []byte{0xde, 0xad, 0xbe, 0xef}
) )
bw := NewBufBinWriter() bw := NewBufBinWriter()
bw.WriteBE(val) bw.WriteBE(val)
@ -115,7 +115,7 @@ func TestBufBinWriterReset(t *testing.T) {
func TestWriteString(t *testing.T) { func TestWriteString(t *testing.T) {
var ( var (
str string = "teststring" str = "teststring"
) )
bw := NewBufBinWriter() bw := NewBufBinWriter()
bw.WriteString(str) bw.WriteString(str)