mirror of
https://github.com/golang/go
synced 2024-11-22 06:54:39 -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)
|
|
}
|