From 8b9c2206b62335616ccaa39c80850da5d437ccf9 Mon Sep 17 00:00:00 2001 From: Daniel Melani Date: Sun, 23 Oct 2016 10:03:32 +0200 Subject: [PATCH] Dummy endpoints --- birdwatcher.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/birdwatcher.go b/birdwatcher.go index 0dad155..8075eb4 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -7,13 +7,23 @@ import ( "net/http" ) -func Test(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - fmt.Fprint(w, "Test\n") +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("/test", Test) + r.GET("/status", Status) + r.GET("/routes", Routes) + r.GET("/protocols", Protocols) log.Fatal(http.ListenAndServe(":8080", r)) }