if you use is.Nil(err) you might get:
some_code.go:43: expected nil: &json.UnmarshalTypeError{Value:"string", Type:(*reflect.rtype)(0xbadc0de), Offset:1234}
where you could get: some_code.go:43: json: cannot unmarshal string into Go value of type int
I like the similicity of using fmt.Sprintf("%#v") but might there be a nicer way?
if you use
is.Nil(err)you might get:some_code.go:43: expected nil: &json.UnmarshalTypeError{Value:"string", Type:(*reflect.rtype)(0xbadc0de), Offset:1234}where you could get:
some_code.go:43: json: cannot unmarshal string into Go value of type intI like the similicity of using
fmt.Sprintf("%#v")but might there be a nicer way?