Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/json: add note in src/encoding/json/decode.go about exporting struct members #13867

Closed
csawyerYumaed opened this issue Jan 8, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@csawyerYumaed
Copy link

commented Jan 8, 2016

file src/encoding/json/decode.go
around the struct docs for the Unmarshall object (around line 39)
// NOTE: you most likely want to "export" your struct fields, to do that, make
// sure the field name starts with an Uppercase character.
// see http://golang.org/ref/spec#Exported_identifiers for more information.

this is basically a drive-by "patch", to make the documentation more sane for go idiots having to wack on some broken code somwhere (i.e. me the go idiot wasting hours digging thru json.Unmarshal because I didn't know I had to "export" my struct. I want other people to not have to waste as much time.

@ianlancetaylor ianlancetaylor changed the title add note in src/encoding/json/decode.go about exporting struct members. encoding/json: add note in src/encoding/json/decode.go about exporting struct members Jan 8, 2016

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Jan 8, 2016

CL https://golang.org/cl/18394 mentions this issue.

@golang golang locked and limited conversation to collaborators Jan 7, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.