Created
May 25, 2018 21:27
-
-
Save Cibernomadas/f1a7221438b7b790a79d77090866f61a 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
package router | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
) | |
func NewServer() *gin.Engine { | |
srv := gin.Default() | |
return srv | |
} | |
func RegisterRoutes(srv *gin.Engine) { | |
srv.GET("/", holaMundo) | |
} | |
func holaMundo(c *gin.Context) { | |
c.String(http.StatusOK, "¡Hola Mundo!") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment