2018-11-24 20:48:46 +01:00
|
|
|
package router
|
|
|
|
|
2018-12-02 19:22:59 +01:00
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"../test"
|
|
|
|
"../calendar"
|
|
|
|
)
|
2018-11-24 20:48:46 +01:00
|
|
|
|
|
|
|
type Route struct {
|
|
|
|
Name string
|
|
|
|
Method string
|
|
|
|
Pattern string
|
|
|
|
HandlerFunc http.HandlerFunc
|
|
|
|
}
|
|
|
|
|
|
|
|
type Routes []Route
|
|
|
|
|
|
|
|
var routes = Routes{
|
2018-12-02 19:22:59 +01:00
|
|
|
Route{"Index", "GET", "/", test.Index,},
|
|
|
|
Route{"AddCalendar", "POST", "/calendar", calendar.AddCalendar},
|
2018-11-24 20:48:46 +01:00
|
|
|
}
|