diff --git a/birdwatcher.go b/birdwatcher.go index 8075eb4..c2d1bcc 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -1,24 +1,11 @@ package main import ( - "fmt" "github.com/julienschmidt/httprouter" "log" "net/http" ) -func Status(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - fmt.Fprint(w, "status\n") -} - -func Routes(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - fmt.Fprint(w, "routes\n") -} - -func Protocols(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - fmt.Fprint(w, "protocols\n") -} - func main() { r := httprouter.New() r.GET("/status", Status) diff --git a/protocols.go b/protocols.go new file mode 100644 index 0000000..997c8ca --- /dev/null +++ b/protocols.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + "github.com/julienschmidt/httprouter" + "net/http" +) + +func Routes(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + fmt.Fprint(w, "routes\n") +} diff --git a/routes.go b/routes.go new file mode 100644 index 0000000..0392dd0 --- /dev/null +++ b/routes.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + "github.com/julienschmidt/httprouter" + "net/http" +) + +func Protocols(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + fmt.Fprint(w, "protocols\n") +} diff --git a/status.go b/status.go new file mode 100644 index 0000000..65f341f --- /dev/null +++ b/status.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + "github.com/julienschmidt/httprouter" + "net/http" +) + +func Status(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + fmt.Fprint(w, "status\n") +}