From e0fcf5a243a8ca47e2276e02a05254b4aa003b2b Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 28 Nov 2012 21:53:22 +0900 Subject: add template filter. --- template/go/base-http-server.go | 2 +- template/go/base-webgo.go | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 template/go/base-webgo.go (limited to 'template') 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}} -- cgit v1.2.3-54-g00ecf