plugeth/common/hexutil
Felix Lange d304da3803 common/hexutil: implement TextMarshaler, TextUnmarshaler
This commit makes the wrapper types more generally applicable.
encoding.TextMarshaler is supported by most codec implementations (e.g.
for yaml).

The tests now ensure that package json actually recognizes the custom
marshaler implementation irrespective of how it is implemented.

The Uint type has new tests, too. These are tricky because uint size
depends on the CPU word size. Turns out that there was one incorrect
case where decoding returned ErrUint64Range instead of ErrUintRange.
2017-03-02 14:05:46 +01:00
..
hexutil_test.go common/hexutil: implement TextMarshaler, TextUnmarshaler 2017-03-02 14:05:46 +01:00
hexutil.go common/hexutil: don't leak encoding/hex errors in Decode 2017-03-02 14:05:46 +01:00
json_example_test.go common/hexutil: implement TextMarshaler, TextUnmarshaler 2017-03-02 14:05:46 +01:00
json_test.go common/hexutil: implement TextMarshaler, TextUnmarshaler 2017-03-02 14:05:46 +01:00
json.go common/hexutil: implement TextMarshaler, TextUnmarshaler 2017-03-02 14:05:46 +01:00