diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-03-22 08:36:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-22 08:36:22 +0800 |
commit | 06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462 (patch) | |
tree | d764690055f2ee7d880bcce2e413a3665fc1e7e9 /rlp/decode.go | |
parent | 1dfd65f6d047407585845dfe9be2ff52a8b9f3ab (diff) | |
parent | 8cf08e4b25c4cd0e0955598342394f34feecca0c (diff) | |
download | dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.gz dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.bz2 dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.lz dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.xz dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.zst dexon-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.zip |
Merge pull request #3756 from fjl/core-types-gencodec
core/types: use gencodec for JSON marshaling code
Diffstat (limited to 'rlp/decode.go')
-rw-r--r-- | rlp/decode.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rlp/decode.go b/rlp/decode.go index c4e5869cc..ee0b7dbcd 100644 --- a/rlp/decode.go +++ b/rlp/decode.go @@ -63,12 +63,16 @@ type Decoder interface { // must contain an element for each decoded field. Decode returns an // error if there are too few or too many elements. // -// The decoding of struct fields honours two struct tags, "tail" and -// "nil". For an explanation of "tail", see the example. -// The "nil" tag applies to pointer-typed fields and changes the -// decoding rules for the field such that input values of size zero -// decode as a nil pointer. This tag can be useful when decoding -// recursive types. +// The decoding of struct fields honours certain struct tags, "tail", +// "nil" and "-". +// +// The "-" tag ignores fields. +// +// For an explanation of "tail", see the example. +// +// The "nil" tag applies to pointer-typed fields and changes the decoding +// rules for the field such that input values of size zero decode as a nil +// pointer. This tag can be useful when decoding recursive types. // // type StructWithEmptyOK struct { // Foo *[20]byte `rlp:"nil"` |