1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00
This commit is contained in:
Daniel Melani 2016-10-23 10:06:28 +02:00
parent 8b9c2206b6
commit f331b7c350
4 changed files with 33 additions and 13 deletions

View file

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

11
protocols.go Normal file
View file

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

11
routes.go Normal file
View file

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

11
status.go Normal file
View file

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