summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhrdtime/rhrdtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/helsinki.at/rhrdtime/rhrdtime.go')
-rw-r--r--src/helsinki.at/rhrdtime/rhrdtime.go14
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)
}