21 lines
314 B
Go
21 lines
314 B
Go
package router
|
|
|
|
import (
|
|
"net/http"
|
|
"../test"
|
|
"../calendar"
|
|
)
|
|
|
|
type Route struct {
|
|
Name string
|
|
Method string
|
|
Pattern string
|
|
HandlerFunc http.HandlerFunc
|
|
}
|
|
|
|
type Routes []Route
|
|
|
|
var routes = Routes{
|
|
Route{"Index", "GET", "/", test.Index,},
|
|
Route{"AddCalendar", "POST", "/calendar", calendar.AddCalendar},
|
|
} |