diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-07-05 09:31:52 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-07-05 09:31:52 +0900 |
commit | d8e36053eca330d3a7989851d38a8df3b09bd48b (patch) | |
tree | 43004808935a9ab986e7ebdf13c74d6842896018 /template | |
parent | faf6aa34bd1ad9fc7a3ba81e6a230301f19c044f (diff) | |
download | vim-sonictemplate-d8e36053eca330d3a7989851d38a8df3b09bd48b.tar.gz vim-sonictemplate-d8e36053eca330d3a7989851d38a8df3b09bd48b.tar.bz2 vim-sonictemplate-d8e36053eca330d3a7989851d38a8df3b09bd48b.zip |
update go templates
Diffstat (limited to 'template')
-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")) +} |