1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

Dummy endpoints

This commit is contained in:
Daniel Melani 2016-10-23 10:03:32 +02:00
parent 08c22dcd72
commit 8b9c2206b6

View file

@ -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))
}