Skip to content

Instantly share code, notes, and snippets.

@lqqyt2423
Created February 25, 2019 06:32
Show Gist options
  • Save lqqyt2423/38db4ea2bbf68f0ea32befc06d8835af to your computer and use it in GitHub Desktop.
Save lqqyt2423/38db4ea2bbf68f0ea32befc06d8835af to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", handler)
log.Fatal(http.ListenAndServe("localhost:8002", nil))
}
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "URL.Path = %q\n", r.URL.Path)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment