mirror of
https://github.com/golang/go
synced 2024-11-22 18:04:48 -07:00
78d9a6074d
R=r, rsc, gri CC=golang-dev https://golang.org/cl/887045
16 lines
228 B
Go
16 lines
228 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"http"
|
|
)
|
|
|
|
func handler(c *http.Conn, r *http.Request) {
|
|
fmt.Fprintf(c, "Hi there, I love %s!", r.URL.Path[1:])
|
|
}
|
|
|
|
func main() {
|
|
http.HandleFunc("/", handler)
|
|
http.ListenAndServe(":8080", nil)
|
|
}
|