Last active
August 29, 2015 14:17
-
-
Save jochasinga/8a2e148da7980d124e91 to your computer and use it in GitHub Desktop.
Router for blog API
This file contains hidden or 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
package main | |
import mux "github.com/julienschmidt/httprouter" | |
func NewRouter *mux.Router { | |
router := mux.New() | |
for _, route := range routes { | |
router.Handle(route.Method, route.Pattern, route.Handle) | |
} | |
return router | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment