mirror of
https://github.com/golang/go
synced 2024-11-24 08:50:14 -07:00
e3e09e3d5f
Fixes #19511 Change-Id: I5585726773b822dba0be0196961132323ebbe084 Reviewed-on: https://go-review.googlesource.com/53071 Reviewed-by: Chris Broadfoot <cbro@golang.org>
17 lines
259 B
Go
17 lines
259 B
Go
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))
|
|
}
|