Sign in
go
/
go
/
7df09b4a03f9e53334672674ba7983d5e7128646
/
.
/
doc
/
articles
/
wiki
/
http-sample.go
blob: ac8cc4f2d6739848fd2babaa50dbfb31c151a863 [
file
] [
log
] [
blame
]
package main
import (
"fmt"
"net/http"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}