22 lines
245 B
Go
22 lines
245 B
Go
|
package router
|
||
|
|
||
|
import "net/http"
|
||
|
import "../test"
|
||
|
|
||
|
type Route struct {
|
||
|
Name string
|
||
|
Method string
|
||
|
Pattern string
|
||
|
HandlerFunc http.HandlerFunc
|
||
|
}
|
||
|
|
||
|
type Routes []Route
|
||
|
|
||
|
var routes = Routes{
|
||
|
Route{
|
||
|
"Index",
|
||
|
"GET",
|
||
|
"/",
|
||
|
test.Index,
|
||
|
},
|
||
|
}
|