aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2014-10-07 20:40:14 +0900
committermattn <mattn.jp@gmail.com>2014-10-07 20:40:14 +0900
commit1dc14cc181a80c4dbb94a7957582800f3c992cb8 (patch)
tree5ad2322d59cb25253a852a29e68c21b2ae6c1ead /template
parenta43b0d6cb32ba0acd790d1b32824d31df1ec37ab (diff)
downloadvim-sonictemplate-1dc14cc181a80c4dbb94a7957582800f3c992cb8.tar.gz
vim-sonictemplate-1dc14cc181a80c4dbb94a7957582800f3c992cb8.tar.bz2
vim-sonictemplate-1dc14cc181a80c4dbb94a7957582800f3c992cb8.zip
Add templates for goji framework
Diffstat (limited to 'template')
-rw-r--r--template/go/base-web-goji.go17
-rw-r--r--template/go/snip-web-goji-get.go3
-rw-r--r--template/go/snip-web-goji-post.go3
3 files changed, 23 insertions, 0 deletions
diff --git a/template/go/base-web-goji.go b/template/go/base-web-goji.go
new file mode 100644
index 0000000..9ed55f1
--- /dev/null
+++ b/template/go/base-web-goji.go
@@ -0,0 +1,17 @@
+package main
+
+import (
+ "fmt"
+ "net/http"
+
+ "github.com/zenazn/goji"
+ "github.com/zenazn/goji/web"
+)
+
+func main() {
+ goji.Get("/", func(c web.C, w http.ResponseWriter, r *http.Request) {
+ "{{_cursor_}}"
+ })
+ goji.Serve()
+}
+{{_filter_:web-goji}}
diff --git a/template/go/snip-web-goji-get.go b/template/go/snip-web-goji-get.go
new file mode 100644
index 0000000..62ea2de
--- /dev/null
+++ b/template/go/snip-web-goji-get.go
@@ -0,0 +1,3 @@
+goji.Get("/", func(c web.C, w http.ResponseWriter, r *http.Request) {
+ {{_cursor_}}
+})
diff --git a/template/go/snip-web-goji-post.go b/template/go/snip-web-goji-post.go
new file mode 100644
index 0000000..2060a62
--- /dev/null
+++ b/template/go/snip-web-goji-post.go
@@ -0,0 +1,3 @@
+goji.Post("/", func(c web.C, w http.ResponseWriter, r *http.Request) {
+ {{_cursor_}}
+})