package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { router := gin.Default() router.Static("styles", "./styles") router.LoadHTMLGlob("templates/*.html") router.GET("/", handler) router.Run() } func handler(ctx *gin.Context) { ctx.HTML(http.StatusOK, "index.html", gin.H{"message": "Hello world"}) }