I'm having a difficult time understanding how to use negroni and httprouter together.
I have a couple of public routes, such as /api/v1/ping
I have a bunch of private routes that need auth middleware, such as /api/v1/user
If I want negroni Common middleware for all of my routes, but I want to apply the auth middleware and others to only the private routes, how can I set this up?
v1.router := httprouter.New()
v1.router.GET("/api/v1/ping", v1.ping)
v1.router.GET("/api/v1/user", v1.getUsers)
n := negroni.Classic()
n.UseHandler(v1.router)
http.ListenAndServe(port, n)