Update export explanation

This commit is contained in:
Bailey Wickham 2019-09-01 16:07:33 -07:00 committed by GitHub
parent f1a6a94afd
commit 99218c520a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,8 +14,8 @@ type response1 struct {
Page int
Fruits []string
}
// Fields must have capital letters to be exposed to other
// programs such as the JSON Marshaller.
// Only exported fields will be encoded/decoded in JSON.
// Fields must start with capital letters to be exported.
type response2 struct {
Page int `json:"page"`
Fruits []string `json:"fruits"`