From 247b239914749ca00fff59389a7ded48ee4c25d0 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 22 Nov 2019 16:00:32 +0100 Subject: [PATCH] rlp: fix staticcheck warnings --- rlp/decode.go | 11 ++++++----- rlp/decode_test.go | 7 +++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rlp/decode.go b/rlp/decode.go index a001866b9d..5f3f5eedfd 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -29,12 +29,13 @@ import ( "sync" ) -var ( - // EOL is returned when the end of the current list - // has been reached during streaming. - EOL = errors.New("rlp: end of list") +//lint:ignore ST1012 EOL is not an error. - // Actual Errors +// EOL is returned when the end of the current list +// has been reached during streaming. +var EOL = errors.New("rlp: end of list") + +var ( ErrExpectedString = errors.New("rlp: expected String or Byte") ErrExpectedList = errors.New("rlp: expected List") ErrCanonInt = errors.New("rlp: non-canonical integer format") diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 634d1cf3bb..e604389af6 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -354,7 +354,7 @@ type tailUint struct { type tailPrivateFields struct { A uint Tail []uint `rlp:"tail"` - x, y bool + x, y bool //lint:ignore U1000 unused fields required for testing purposes. } type nilListUint struct { @@ -806,9 +806,8 @@ func ExampleDecode() { input, _ := hex.DecodeString("C90A1486666F6F626172") type example struct { - A, B uint - private uint // private fields are ignored - String string + A, B uint + String string } var s example