]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/json: clarify documention for Unmarshal into a pointer.
authorTuo Shan <shantuo@google.com>
Tue, 7 Feb 2017 02:06:40 +0000 (18:06 -0800)
committerRuss Cox <rsc@golang.org>
Fri, 10 Feb 2017 13:39:10 +0000 (13:39 +0000)
Fixes #18730.

Change-Id: If3ef28e62f7e449d4c8dc1dfd78f7d6f5a87ed26
Reviewed-on: https://go-review.googlesource.com/36478
Reviewed-by: Russ Cox <rsc@golang.org>
src/encoding/json/decode.go

index 77fc4607dba51b89f2deeddf30d0827fe3f323ff..c815599cd52740e9a160c5e41a3e399a05ce768d 100644 (file)
@@ -22,7 +22,8 @@ import (
 )
 
 // Unmarshal parses the JSON-encoded data and stores the result
-// in the value pointed to by v.
+// in the value pointed to by v. If v is nil or not a pointer,
+// Unmarshal returns an InvalidUnmarshalError.
 //
 // Unmarshal uses the inverse of the encodings that
 // Marshal uses, allocating maps, slices, and pointers as necessary,