Skip to content

Instantly share code, notes, and snippets.

@Daniel1984
Created April 22, 2020 17:52
Show Gist options
  • Save Daniel1984/918573d7250a6ff6cd69cdfd5ba359dd to your computer and use it in GitHub Desktop.
Save Daniel1984/918573d7250a6ff6cd69cdfd5ba359dd to your computer and use it in GitHub Desktop.
// cmd/api/router/router.go
package router
import (
"github.com/boilerplate/cmd/api/handlers/getuser"
"github.com/boilerplate/pkg/application"
"github.com/julienschmidt/httprouter"
)
func Get(app *application.Application) *httprouter.Router {
mux := httprouter.New()
mux.GET("/users", getuser.Do(app))
return mux
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment