Created
December 6, 2020 17:48
-
-
Save madflojo/746d40cfc8e2d10115ca876416c1100c to your computer and use it in GitHub Desktop.
maps.vs.structs.structs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example is our main data structure used for JSON parsing | |
type Example struct { | |
Name string `json:"name"` | |
Numbers []int `json:"numbers"` | |
Nested Nested `json:"nested"` | |
} | |
// Nested is an embedded structure within Example | |
type Nested struct { | |
IsIt bool `json:"isit"` | |
Description string `json:"description"` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment