Created
January 29, 2020 20:31
-
-
Save olafkotur/1663f2398957c5f213f0fbcc59087503 to your computer and use it in GitHub Desktop.
Structs in Golang
This file contains 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
// JSON | |
type SomeData struct { | |
Id int `json:"id"` | |
Status string `json:"status"` | |
} | |
var data []SomeData | |
data = append(data, SomeData{1, "Hello World"}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment