diff options
author | mattn <mattn.jp@gmail.com> | 2014-10-07 20:40:14 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2014-10-07 20:40:14 +0900 |
commit | 1dc14cc181a80c4dbb94a7957582800f3c992cb8 (patch) | |
tree | 5ad2322d59cb25253a852a29e68c21b2ae6c1ead /template | |
parent | a43b0d6cb32ba0acd790d1b32824d31df1ec37ab (diff) | |
download | vim-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.go | 17 | ||||
-rw-r--r-- | template/go/snip-web-goji-get.go | 3 | ||||
-rw-r--r-- | template/go/snip-web-goji-post.go | 3 |
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_}} +}) |