diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-09-15 17:46:47 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-09-15 17:46:47 (GMT) |
commit | 496f05ca42a1021d26741c17607f5f7a813f4a2f (patch) | |
tree | dbaaf3f9f95d3856eb2dab082acb694aa7f91cb6 /src | |
parent | e7240253ca69291fac636478fd54568467d6c6e2 (diff) |
got rid of martini
Diffstat (limited to 'src')
-rw-r--r-- | src/helsinki.at/rhrdtime/rhrdtime.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/helsinki.at/rhrdtime/rhrdtime.go b/src/helsinki.at/rhrdtime/rhrdtime.go index 5fa72a1..ca4d4a7 100644 --- a/src/helsinki.at/rhrdtime/rhrdtime.go +++ b/src/helsinki.at/rhrdtime/rhrdtime.go @@ -31,7 +31,6 @@ import ( "net/http" "time" - "github.com/go-martini/martini" "github.com/gorilla/websocket" ) @@ -105,15 +104,6 @@ func handleNTPClient(w http.ResponseWriter, r *http.Request) { } } -func RunMartini(addr string) { - m := martini.Classic() - m.Get("/ntp", func(w http.ResponseWriter, r *http.Request) { - handleNTPClient(w, r) - }) - - m.RunOnAddr(addr) -} - func main() { addr_s := flag.String("addr", ":3000", "addr:port to listen on, default: ':3000'") help := flag.Bool("help", false, "show usage") @@ -124,5 +114,7 @@ func main() { return } - RunMartini(*addr_s) + http.HandleFunc("/ntp", handleNTPClient) + + http.ListenAndServe(*addr_s, nil) } |