diff options
author | mattn <mattn.jp@gmail.com> | 2012-10-25 19:06:37 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2012-10-25 19:06:37 +0900 |
commit | e97be0835bc225d673fe2a71d186943b09f7a29c (patch) | |
tree | 2bd2db8223fdde9bc3889afe310581ab975f40d3 /template/go | |
parent | 46c231c26ae9c00887ed4fd852096bc86bdebf70 (diff) | |
download | vim-sonictemplate-e97be0835bc225d673fe2a71d186943b09f7a29c.tar.gz vim-sonictemplate-e97be0835bc225d673fe2a71d186943b09f7a29c.tar.bz2 vim-sonictemplate-e97be0835bc225d673fe2a71d186943b09f7a29c.zip |
add http-server for go.
Diffstat (limited to 'template/go')
-rw-r--r-- | template/go/base-http-server.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/template/go/base-http-server.go b/template/go/base-http-server.go new file mode 100644 index 0000000..abe84d4 --- /dev/null +++ b/template/go/base-http-server.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + "net/http" +) + +func main() { + http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "hello world") + }) + http.ListenAndServe(":8080", nil) +} |