Urara-Blog/node_modules/.pnpm-store/v3/files/04/8e499711f829b2eb4ed1c7f2e8b202149236f53e0dd7a504d4101af363017e1e3a83ec65877871b1e7fba6f5e17c820e25407825bc1c9e2d9b140f24e61748
2022-08-14 01:14:53 +08:00

18 lines
No EOL
329 B
Text

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))
}
// From https://golang.org/doc/articles/wiki/#tmp_3