Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Route struct {
- Name string
- Method string
- Pattern string
- HandlerFunc http.HandlerFunc
- }
- type Routes []Route
- func CreateRoutes() Routes {
- return Routes{
- Route{
- "UrlRoot",
- "GET",
- "/",
- UrlRoot,
- },
- Route{
- "UrlShow",
- "GET",
- "/{shorturl}",
- UrlShow,
- },
- Route{
- "UrlCreate",
- "POST",
- "/Create",
- UrlCreate,
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement