Skip to content

Instantly share code, notes, and snippets.

@olafkotur
Created January 29, 2020 20:31
Show Gist options
  • Save olafkotur/1663f2398957c5f213f0fbcc59087503 to your computer and use it in GitHub Desktop.
Save olafkotur/1663f2398957c5f213f0fbcc59087503 to your computer and use it in GitHub Desktop.
Structs in Golang
// 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