]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: fix format string in the Fuzz func
authorDmitry Vyukov <dvyukov@google.com>
Sat, 17 Aug 2019 20:22:22 +0000 (13:22 -0700)
committerDmitry Vyukov <dvyukov@google.com>
Sun, 18 Aug 2019 01:16:33 +0000 (01:16 +0000)
Currently test build fails with:

$ go test -tags=gofuzz encoding/json
encoding/json/fuzz.go:36:4: Println call has possible formatting directive %s
FAIL encoding/json [build failed]

Change-Id: I23aef44a421ed0e7bcf48b74ac5a8c6768a4841b
Reviewed-on: https://go-review.googlesource.com/c/go/+/190698
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/encoding/json/fuzz.go

index 4872b6f7ee1b0e55e457b828e373728a603d1648..be03f0d7ffc55510da9dcb41937709c959b6d9f9 100644 (file)
@@ -33,7 +33,7 @@ func Fuzz(data []byte) (score int) {
                err = Unmarshal(m, u)
                if err != nil {
                        fmt.Printf("v=%#v\n", v)
-                       fmt.Println("m=%s\n", string(m))
+                       fmt.Printf("m=%s\n", m)
                        panic(err)
                }
        }