mirror of
https://github.com/golang/go
synced 2024-11-18 08:44:43 -07:00
fc3eae5281
Updates #28387 Updates #30316 Fixes #35574 Change-Id: I21c9e18573909e092ed8dcec91b8542bb97e9f5a Reviewed-on: https://go-review.googlesource.com/c/go/+/207263 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
19 lines
277 B
Go
19 lines
277 B
Go
// +build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"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)
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|