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:
parent
08c22dcd72
commit
8b9c2206b6
1 changed files with 13 additions and 3 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue