Performance improvements to response and moved tests around

This commit is contained in:
Channel Cat
2016-10-08 15:21:40 -07:00
parent 74b0cbae1b
commit 6041e7cfa6
7 changed files with 143 additions and 113 deletions

View File

@@ -0,0 +1,16 @@
package main
import (
"fmt"
"os"
"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)
http.ListenAndServe(":" + os.Args[1], nil)
}