box-o-sand/gotime/gotour-artifacts/hello-web/main.go
Dan Buch 44999623da Collapsing tree into more sane Go project layout
since I was in here looking at something unrelated...
2012-12-13 18:12:43 -05:00

20 lines
237 B
Go

package main
import (
"fmt"
"net/http"
)
type Hello struct{}
func (h Hello) ServeHTTP(
w http.ResponseWriter,
r *http.Request) {
fmt.Fprint(w, "Hello!\n")
}
func main() {
var h Hello
http.ListenAndServe("localhost:4000", h)
}