• Emil Hessman's avatar
    encoding/json: address go vet reports · 2c987e16
    Emil Hessman authored
    The error message for decoding a unquoted value into a struct field with
    the ,string option specified has two arguments when one is needed.
    Make the error message take one argument and add a test in order to cover
    the case when a unquoted value is specified.
    
    Also add error value as the missing argument for Fatalf call in test.
    
    Fixes the following go vet reports:
    
    decode.go:602: wrong number of args for format in Errorf call: 1 needed but 2 args
    decode_test.go:1088: missing argument for Fatalf("%v"): format reads arg 1, have only 0 args
    
    Change-Id: Id036e10c54c4a7c1ee9952f6910858ecc2b84134
    Reviewed-on: https://go-review.googlesource.com/2109Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
    2c987e16
Name
Last commit
Last update
..
testdata Loading commit data...
bench_test.go Loading commit data...
decode.go Loading commit data...
decode_test.go Loading commit data...
encode.go Loading commit data...
encode_test.go Loading commit data...
example_test.go Loading commit data...
fold.go Loading commit data...
fold_test.go Loading commit data...
indent.go Loading commit data...
scanner.go Loading commit data...
scanner_test.go Loading commit data...
stream.go Loading commit data...
stream_test.go Loading commit data...
tagkey_test.go Loading commit data...
tags.go Loading commit data...
tags_test.go Loading commit data...