2016-10-02 03:18:41 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2016-10-08 23:21:40 +01:00
|
|
|
"os"
|
2016-10-02 03:18:41 +01:00
|
|
|
"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)
|
2016-10-08 23:21:40 +01:00
|
|
|
http.ListenAndServe(":" + os.Args[1], nil)
|
2016-10-02 03:18:41 +01:00
|
|
|
}
|