mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-09 00:00:05 +01:00
Split up
This commit is contained in:
parent
8b9c2206b6
commit
f331b7c350
4 changed files with 33 additions and 13 deletions
|
@ -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
11
protocols.go
Normal 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
11
routes.go
Normal 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
11
status.go
Normal 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")
|
||||
}
|
Loading…
Add table
Reference in a new issue