Created
October 14, 2015 11:00
-
-
Save sogko/7f043054df11533b4449 to your computer and use it in GitHub Desktop.
hello-world-relay-part-1 - In-memory database
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
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