]> Cypherpunks repositories - gostls13.git/commit
encoding/json: add "json: " prefix to SyntaxError messages
authorKevin Burke <kev@inburke.com>
Mon, 19 Oct 2020 20:29:40 +0000 (13:29 -0700)
committerKevin Burke <kev@inburke.com>
Wed, 21 Oct 2020 18:50:01 +0000 (18:50 +0000)
commit6af088bfc66c13143c9ef46b4cf0805df77a8fbe
tree0fde5c9608b15b0511812d165856204970046af0
parent612a363bef9ae29d190f6daa2a5a1623f78c874b
encoding/json: add "json: " prefix to SyntaxError messages

The other named errors - UnmarshalTypeError, etc - in this package do
the same, so we should prepend the package prefix to error messages
for consistency.

Add a note to the release docs in case this is interpreted as
a breaking change.

Fixes #36221.

Change-Id: Ie24b532bbf9812e108c259fa377e2a6b64319ed4
Reviewed-on: https://go-review.googlesource.com/c/go/+/263619
Run-TryBot: Kevin Burke <kev@inburke.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Kevin Burke <kev@inburke.com>
Trust: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
doc/go1.16.html
src/cmd/go/testdata/script/mod_proxy_invalid.txt
src/cmd/go/testdata/script/mod_query_empty.txt
src/encoding/json/scanner.go
src/html/template/escape_test.go