added go test app

This commit is contained in:
Felipe Coury committed 2013-06-21 03:03:13 -03:00
1 parent e16be6096b
commit b31ef35ccc
3 files changed
+22

No files matched your search

+1
View File
@@ -0,0 +1 @@
go
+1
View File
@@ -0,0 +1 @@
web: go
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"fmt"
"net/http"
"os"
)
func main() {
http.HandleFunc("/", hello)
fmt.Println("listening...")
err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
if err != nil {
panic(err)
}
}
func hello(res http.ResponseWriter, req *http.Request) {
fmt.Fprintln(res, "hello, world")
}