mirror of
https://github.com/golang/go
synced 2024-11-14 14:20:30 -07:00
a2332a32b8
R=adg, r2 CC=golang-dev https://golang.org/cl/2302041
16 lines
237 B
Go
16 lines
237 B
Go
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)
|
|
}
|