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:
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.
Because at the end of the day it's me who end up testing and running that code, not you.
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.
And of course, it's totally valid to prefer the different paradigm that these provide! Hasn't been ideal for me, though.
Services though? Totally an appropriate time to fire up Go, in my opinion.
And, even then, Python (which I'm most familiar with) has downsides for JSON services. Translating from an ORM (sqlalchemy) to formatted JSON is something you have to relegate to some magical methods or do one by one, neither is a great solution.
That would be an advantage of Go-as-a-language over Ruby-as-a-language in a world where JRuby didn't exist.
Personally, I would like to highlight the part about Martini not being idiomatic. Being idiomatic in Go is a fairly big deal. It makes your code predictable and easier to read and maintain for other Go developers, and learning idiomatic practices can help a Go developer more easily pick up other Go frameworks and libraries.
That's really the only concern I would have about using Martini to "get started" with Go, as it would actually lead you down a wholly different direction from the rest of the community and may actually make learning Go more difficult for a new developer.
As an alternative, I would recommend the wonderful Go By Example: http://gobyexample.com/