Commit bea3879d authored by Taylor Gerring's avatar Taylor Gerring

If nil, type doesn't matter

parent ac03ff6f
...@@ -45,6 +45,9 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) { ...@@ -45,6 +45,9 @@ func (d *hexdata) UnmarshalJSON(b []byte) (err error) {
func newHexData(input interface{}) *hexdata { func newHexData(input interface{}) *hexdata {
d := new(hexdata) d := new(hexdata)
if input == nil {
d.data = nil
}
switch input := input.(type) { switch input := input.(type) {
case []byte: case []byte:
d.data = input d.data = input
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment