Created
February 25, 2019 06:32
-
-
Save lqqyt2423/38db4ea2bbf68f0ea32befc06d8835af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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