rlp: fix staticcheck warnings

This commit is contained in:
Felix Lange 2019-11-22 16:00:32 +01:00
parent 36a684ca1e
commit 247b239914
2 changed files with 9 additions and 9 deletions

View file

@ -29,12 +29,13 @@ import (
"sync"
)
var (
//lint:ignore ST1012 EOL is not an error.
// EOL is returned when the end of the current list
// has been reached during streaming.
EOL = errors.New("rlp: end of list")
var EOL = errors.New("rlp: end of list")
// Actual Errors
var (
ErrExpectedString = errors.New("rlp: expected String or Byte")
ErrExpectedList = errors.New("rlp: expected List")
ErrCanonInt = errors.New("rlp: non-canonical integer format")

View file

@ -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 {
@ -807,7 +807,6 @@ func ExampleDecode() {
type example struct {
A, B uint
private uint // private fields are ignored
String string
}