2017-01-20 00:31:22 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
port = flag.String("port", "9090", "HTTP port to listen on")
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
flag.Parse()
|
|
|
|
http.ListenAndServe(":"+*port, http.HandlerFunc(handle))
|
|
|
|
}
|
|
|
|
|
|
|
|
func handle(w http.ResponseWriter, r *http.Request) {
|
2017-01-20 01:16:40 +00:00
|
|
|
fmt.Fprintln(w, "Route is go!")
|
|
|
|
fmt.Fprintf(w, "%#v\n", r.Header)
|
2017-01-20 00:31:22 +00:00
|
|
|
}
|