diff options
Diffstat (limited to 'template/go')
-rw-r--r-- | template/go/base-web-gin.go | 2 | ||||
-rw-r--r-- | template/go/base-web-ion.go | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/template/go/base-web-gin.go b/template/go/base-web-gin.go index 3ed49b0..dbfafb5 100644 --- a/template/go/base-web-gin.go +++ b/template/go/base-web-gin.go @@ -10,7 +10,7 @@ func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.JSON(200, gin.H{ - "message": "Hello World", + "message": "{{_cursor_}}", }) }) r.Run() diff --git a/template/go/base-web-ion.go b/template/go/base-web-ion.go new file mode 100644 index 0000000..311088e --- /dev/null +++ b/template/go/base-web-ion.go @@ -0,0 +1,14 @@ +package main + +import ( + "github.com/get-ion/ion" + "github.com/get-ion/ion/context" +) + +func main() { + app := ion.New() + app.Handle("GET", "/", func(ctx context.Context) { + ctx.HTML("{{_cursor_}}") + }) + app.Run(ion.Addr(":8080")) +} |