aboutsummaryrefslogtreecommitdiff
path: root/template/go/base-web-gin.go
blob: dbfafb5d144e43ce8648f09da76d46f0ddabbdf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main

import (
	"github.com/gin-gonic/gin"
	"github.com/mattn/go-colorable"
)

func main() {
	gin.DefaultWriter = colorable.NewColorableStderr()
	r := gin.Default()
	r.GET("/", func(c *gin.Context) {
		c.JSON(200, gin.H{
			"message": "{{_cursor_}}",
		})
	})
	r.Run()
}