]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: use Deprecated markers
authorJoe Tsai <joetsai@digital-static.net>
Wed, 11 Oct 2017 21:41:25 +0000 (14:41 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Wed, 11 Oct 2017 22:09:22 +0000 (22:09 +0000)
In #10909, it was decided that "Deprecated:" is a magic string for
tools (e.g., #17056 for godoc) to detect deprecated identifiers.
Use those convention instead of custom written prose.

Change-Id: Ia514fc3c88fc502e86c6e3de361c435f4cb80b22
Reviewed-on: https://go-review.googlesource.com/70110
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>

src/encoding/json/decode.go
src/encoding/json/encode.go

index bc3bd9733d3f54d10188a3fe65da949aebb3549f..44f903535896fae57a907cd5493e855fd6daadb0 100644 (file)
@@ -138,7 +138,8 @@ func (e *UnmarshalTypeError) Error() string {
 
 // An UnmarshalFieldError describes a JSON object key that
 // led to an unexported (and therefore unwritable) struct field.
-// (No longer used; kept for compatibility.)
+//
+// Deprecated: No longer used; kept for compatibility.
 type UnmarshalFieldError struct {
        Key   string
        Type  reflect.Type
index d1dda9796af8b61f486da5dd75589f91b62e210b..3f7a8d01751fe20447d3f02a4004f572dd5ee3ae 100644 (file)
@@ -245,8 +245,8 @@ func (e *UnsupportedValueError) Error() string {
 // attempting to encode a string value with invalid UTF-8 sequences.
 // As of Go 1.2, Marshal instead coerces the string to valid UTF-8 by
 // replacing invalid bytes with the Unicode replacement rune U+FFFD.
-// This error is no longer generated but is kept for backwards compatibility
-// with programs that might mention it.
+//
+// Deprecated: No longer used; kept for compatibility.
 type InvalidUTF8Error struct {
        S string // the whole string value that caused the error
 }