rlp: fix staticcheck warnings (#20368)
* rlp: fix staticcheck warnings * rlp: fix ExampleDecode test
This commit is contained in:
committed by
Péter Szilágyi
parent
9ef90dbf30
commit
44b41641f8
@ -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
|
||||
@ -819,7 +818,7 @@ func ExampleDecode() {
|
||||
fmt.Printf("Decoded value: %#v\n", s)
|
||||
}
|
||||
// Output:
|
||||
// Decoded value: rlp.example{A:0xa, B:0x14, private:0x0, String:"foobar"}
|
||||
// Decoded value: rlp.example{A:0xa, B:0x14, String:"foobar"}
|
||||
}
|
||||
|
||||
func ExampleDecode_structTagNil() {
|
||||
|
Reference in New Issue
Block a user