mirror of
https://github.com/golang/go
synced 2024-11-22 16:25:07 -07:00
cd1a2f7e74
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5701050
16 lines
241 B
Go
16 lines
241 B
Go
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)
|
|
}
|