Skip to content

Instantly share code, notes, and snippets.

@madflojo
Created December 6, 2020 17:48
Show Gist options
  • Save madflojo/746d40cfc8e2d10115ca876416c1100c to your computer and use it in GitHub Desktop.
Save madflojo/746d40cfc8e2d10115ca876416c1100c to your computer and use it in GitHub Desktop.
maps.vs.structs.structs
// 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