Sign in
go
/
go
/
94401f524ea26f72afcb6454b0cd2c5c7749a7f5
/
.
/
doc
/
codelab
/
wiki
/
http-sample.go
blob: 33379a1b65068e9589da81054b708946b2703799 [
file
] [
log
] [
blame
]
package main
import (
"fmt"
"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)
}