go/src/encoding
Eugene Kalinin 02196d3657 encoding/json: correct caller's name in encoding errors
1. Change mapencode.encode to use fmt.Error rather than MarshalerError.
MarshalerError refer to MarshalJSON, but mapencode.encode does not use that.

2. Add sourceFunc field to MarshalerError to record the name of the function
that creates the error, so that the Error method can report it correctly.

Fixes #29753

Change-Id: I186c2fac8470ae2f9e300501de3730face642230
Reviewed-on: https://go-review.googlesource.com/c/go/+/184119
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-10-16 22:58:08 +00:00
..
ascii85 encoding/ascii85: make bigtest big again 2017-06-23 14:28:30 +00:00
asn1 encoding/asn1: handle ASN1's string type BMPString 2019-09-09 23:04:30 +00:00
base32 encoding/base32: increase performance and code reuse 2019-09-11 00:56:39 +00:00
base64 encoding/base64: speed up the decoder 2019-03-13 10:39:58 +00:00
binary all: simplify code using "gofmt -s -w" 2019-05-06 22:19:22 +00:00
csv src: gofmt -s 2019-09-09 18:57:05 +00:00
gob src: gofmt -s 2019-09-09 18:57:05 +00:00
hex encoding/hex: simplify encoder arithmetic 2019-03-05 17:40:09 +00:00
json encoding/json: correct caller's name in encoding errors 2019-10-16 22:58:08 +00:00
pem all: remove PEM-encoded private keys from tests 2019-05-21 20:03:55 +00:00
xml std: remove unused bits of code all over the place 2019-09-02 12:57:37 +00:00
encoding.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00