Skip to content

Instantly share code, notes, and snippets.

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

Embed
What would you like to do?
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
You can’t perform that action at this time.