Skip to content

Instantly share code, notes, and snippets.

@Cibernomadas Cibernomadas/main.go
Created May 29, 2018

Embed
What would you like to do?
func holaMundo(c *gin.Context) {
username := "Cibernómada"
posts := [...]map[string]string{
{"user": "Pedro",
"body": "¡GoBlog mola mucho!"},
{"user": "Juan",
"body": "En cibernómadas publican cosas chulas."},
}
c.HTML(http.StatusOK, "index.html", gin.H{
"title": "Hi! GoBlog.",
"username": username,
"posts": posts,
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.