mirror of
https://github.com/golang/go.git
synced 2025-05-06 08:03:03 +00:00
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))
|
|
}
|