Does it have a middleware stack? no
Martini is a request router not a http server.
You can wrap http.HandleFunc to make it behave like middleware.
You do not need to import a framework for these things:
Because at the end of the day it's me who end up testing and running that code, not you.
You can read more here - https://medium.com/@matryer/the-http-handlerfunc-wrapper-tec...
I don't understand this Go community mindset which says that "nothing is needed but the std lib". My use case isn't Google's or anybody else's.
If the Go team wanted an idiomatic router or middleware stack well they should have provided fully featured ones in the standard lib. There are none. It means "user land".
But you linked a talk that recommends a library to deal with route variables.
> You can wrap http.HandleFunc to make it behave like middleware.
But you linked a talk that recommends a library to deal with middlewares.
Maybe you should review the links you post at first place.
The main thing lacking from net/http is a flexible router. Using the standard mux and parse params out of the request is doable but something like httprouter is often worthwhile.
Wrapping Handle or HandleFunc is easy enough that you don't really need some framework for middleware. If you keep to the standard interface there is plenty of middleware about if you need it. Though you can use things like Gorilla context for request context it is so easy to use a map of requests pointers to data protected by a mutex it seems silly to use a library to do it.
I feel like Go is a bit of an anti-framework language in general. Anyone trying to offer an all-things-to-everyone solution is going to stray into reflection and interface{} everywhere and I think the more Go you write, the less happy you get with this sort of approach.