diff options
author | mattn <mattn.jp@gmail.com> | 2012-11-28 21:53:22 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2012-11-28 21:53:22 +0900 |
commit | e0fcf5a243a8ca47e2276e02a05254b4aa003b2b (patch) | |
tree | f96709ca62da39c825613596a7dae8a255cbdef8 /template | |
parent | e97be0835bc225d673fe2a71d186943b09f7a29c (diff) | |
download | vim-sonictemplate-e0fcf5a243a8ca47e2276e02a05254b4aa003b2b.tar.gz vim-sonictemplate-e0fcf5a243a8ca47e2276e02a05254b4aa003b2b.tar.bz2 vim-sonictemplate-e0fcf5a243a8ca47e2276e02a05254b4aa003b2b.zip |
add template filter.
Diffstat (limited to 'template')
-rw-r--r-- | template/go/base-http-server.go | 2 | ||||
-rw-r--r-- | template/go/base-webgo.go | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/template/go/base-http-server.go b/template/go/base-http-server.go index abe84d4..b760d93 100644 --- a/template/go/base-http-server.go +++ b/template/go/base-http-server.go @@ -7,7 +7,7 @@ import ( func main() { http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "hello world") + fmt.Fprintf(w, "{{_cursor_}}") }) http.ListenAndServe(":8080", nil) } diff --git a/template/go/base-webgo.go b/template/go/base-webgo.go new file mode 100644 index 0000000..c67b6a7 --- /dev/null +++ b/template/go/base-webgo.go @@ -0,0 +1,13 @@ +package main + +import ( + "github.com/hoisie/web" +) + +func main() { + web.Get("/", func() string { + return "{{_cursor_}}" + }) + web.Run(":8080") +} +{{_filter_:webgo}} |