Skip to content

Instantly share code, notes, and snippets.

@Cibernomadas
Created May 25, 2018 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cibernomadas/f1a7221438b7b790a79d77090866f61a to your computer and use it in GitHub Desktop.
Save Cibernomadas/f1a7221438b7b790a79d77090866f61a to your computer and use it in GitHub Desktop.
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