mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
rlp: fix staticcheck warnings
This commit is contained in:
parent
36a684ca1e
commit
247b239914
2 changed files with 9 additions and 9 deletions
|
|
@ -29,12 +29,13 @@ import (
|
||||||
"sync"
|
"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")
|
|
||||||
|
|
||||||
// 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")
|
ErrExpectedString = errors.New("rlp: expected String or Byte")
|
||||||
ErrExpectedList = errors.New("rlp: expected List")
|
ErrExpectedList = errors.New("rlp: expected List")
|
||||||
ErrCanonInt = errors.New("rlp: non-canonical integer format")
|
ErrCanonInt = errors.New("rlp: non-canonical integer format")
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ type tailUint struct {
|
||||||
type tailPrivateFields struct {
|
type tailPrivateFields struct {
|
||||||
A uint
|
A uint
|
||||||
Tail []uint `rlp:"tail"`
|
Tail []uint `rlp:"tail"`
|
||||||
x, y bool
|
x, y bool //lint:ignore U1000 unused fields required for testing purposes.
|
||||||
}
|
}
|
||||||
|
|
||||||
type nilListUint struct {
|
type nilListUint struct {
|
||||||
|
|
@ -806,9 +806,8 @@ func ExampleDecode() {
|
||||||
input, _ := hex.DecodeString("C90A1486666F6F626172")
|
input, _ := hex.DecodeString("C90A1486666F6F626172")
|
||||||
|
|
||||||
type example struct {
|
type example struct {
|
||||||
A, B uint
|
A, B uint
|
||||||
private uint // private fields are ignored
|
String string
|
||||||
String string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var s example
|
var s example
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue