Created
May 29, 2017 22:24
-
-
Save Adron/ad15920b576118758d37112dbdcfe526 to your computer and use it in GitHub Desktop.
Creating a simple routes data structure to store routes in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Route struct { | |
Name string | |
Method string | |
Pattern string | |
HandlerFunc http.HandlerFunc | |
} | |
type Routes []Route | |
var routes = Routes{ | |
Route{ | |
"Index", | |
"GET", | |
"/", | |
HandleThis, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment