Skip to content

Instantly share code, notes, and snippets.

@sogko
Created October 14, 2015 11:00
Show Gist options
  • Save sogko/7f043054df11533b4449 to your computer and use it in GitHub Desktop.
Save sogko/7f043054df11533b4449 to your computer and use it in GitHub Desktop.
hello-world-relay-part-1 - In-memory database
package data
// Data model structs
type Post struct {
Id string `json:"id"`
Text string `json:"text"`
}
// Mock data
var latestPost = &Post{
Id: "1",
Text: "Hello World",
}
// Data getters/setters
func GetLatestPost() *Post {
return latestPost
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment