1
0
mirror of https://github.com/golang/go synced 2024-11-25 10:17:57 -07:00

json: minor comment fix.

I screwed up and didn't write one of the code review changes to disk
before submitting.

TBR=rsc

R=rsc
https://golang.org/cl/154122
This commit is contained in:
Adam Langley 2009-11-13 14:59:04 -08:00
parent f9919ba323
commit a070722340

View File

@ -289,7 +289,7 @@ func Unmarshal(s string, val interface{}) (ok bool, errtok string) {
v := reflect.NewValue(val); v := reflect.NewValue(val);
var b *structBuilder; var b *structBuilder;
// If val is a pointer to a slice, we mutate the pointee. // If val is a pointer to a slice, we append to the slice.
if ptr, ok := v.(*reflect.PtrValue); ok { if ptr, ok := v.(*reflect.PtrValue); ok {
if slice, ok := ptr.Elem().(*reflect.SliceValue); ok { if slice, ok := ptr.Elem().(*reflect.SliceValue); ok {
b = &structBuilder{val: slice} b = &structBuilder{val: slice}