aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2017-07-05 09:31:52 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2017-07-05 09:31:52 +0900
commitd8e36053eca330d3a7989851d38a8df3b09bd48b (patch)
tree43004808935a9ab986e7ebdf13c74d6842896018 /template
parentfaf6aa34bd1ad9fc7a3ba81e6a230301f19c044f (diff)
downloadvim-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.go2
-rw-r--r--template/go/base-web-ion.go14
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"))
+}