added go test app

This commit is contained in:
Felipe Coury
2013-06-21 02:55:20 -03:00
parent e16be6096b
commit b31ef35ccc
3 changed files with 22 additions and 0 deletions

1
tests/go/.godir Normal file
View File

@@ -0,0 +1 @@
go

1
tests/go/Procfile Normal file
View File

@@ -0,0 +1 @@
web: go

20
tests/go/web.go Normal file
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")
}