mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10:42 +00:00
33 lines
468 B
Go
33 lines
468 B
Go
package main
|
|
|
|
import "net/http"
|
|
|
|
type Route struct {
|
|
Name string
|
|
Method string
|
|
Pattern string
|
|
HandlerFunc http.HandlerFunc
|
|
}
|
|
|
|
type Routes []Route
|
|
|
|
var routes = Routes{
|
|
Route{
|
|
"Index",
|
|
"GET",
|
|
"/",
|
|
Index,
|
|
},
|
|
Route{
|
|
"TodoIndex",
|
|
"GET",
|
|
"/todos",
|
|
TodoIndex,
|
|
},
|
|
Route{
|
|
"TodoShow",
|
|
"GET",
|
|
"/todos/{todoId}",
|
|
TodoShow,
|
|
},
|
|
} |