Sign in
go
/
tour
/
eff9b7ba0df29aaa882be16def4b79cc207055f8
/
.
/
content
/
methods
/
web-servers.go
blob: 9624a9257447ffd0f4afedd2d07bbe55d87683b8 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import (
"fmt"
"net/http"
)
type Hello struct{}
func (h Hello) ServeHTTP(
w http.ResponseWriter,
r *http.Request) {
fmt.Fprint(w, "Hello!")
}
func main() {
var h Hello
http.ListenAndServe("localhost:4000", h)
}