Created
May 29, 2018 20:55
-
-
Save Cibernomadas/d955e1eb61c7d832339f52a967194d4e to your computer and use it in GitHub Desktop.
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
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