Martini is defunct, but Gin took their torch and ran with it. I use such
http routing frameworks as part of my day job, and would recommend the
three following ones.
1) Echo (https://github.com/labstack/echo)
2) Gin (https://github.com/gin-gonic/gin)
3) Chi (https://github.com/go-chi/chi)

I would also pick them in that order of preference. Echo is very similar to
Gin, except instead of passing struct pointers around, it uses interfaces
which you can mock, and their middleware API is more flexible, precisely
allowing to to short circuit the middleware chain wherever you want, it's
up to you. Chi is much more minimal.

I'm a big proponent of spec driven development when it comes to HTTP API's,
and also have released a package to generate your server boiler plate
(works best with Echo) from an OpenAPI v3.0 specification.
https://github.com/deepmap/oapi-codegen


-- Marcin

On Sun, Mar 15, 2020 at 9:11 AM Jake Montgomery <jake6...@gmail.com> wrote:

> Note that Martini is not maintained anymore
>>
>
> I hope this is not too off topic, but when choosing a third party go
> package it is really important to consider whether the package is being
> maintained. In my experience it is worth steering clear of any complex
> package that is not being actively maintained, for a variety of reasons.
> Its usually the second thing I check. A quick glance at
> https://github.com/go-martini/martini shows that no code changes have
> been made in the last 4 years and the readme starts with: "NOTE: The
> martini framework is no longer maintained."
>
> If you do decide to take on such a package be prepared to dive deep into
> the code, since you will likely have to fix bugs in it, and make features
> changes yourself when needed. Additionally, it is often difficult to get
> support, even on SO.
>
> Your question is reasonable, and IMHO posting it here was appropriate. I
> hope you get an actual answer, but I would not count on it.
>
>
> On Saturday, March 14, 2020 at 10:05:07 PM UTC-4, kortschak wrote:
>>
>> Note that Martini is not maintained anymore and the original author had
>> a fair bit to say about the merits or otherwise of the packages (via
>> the wayback machine since codegangsta.io is no longer live):
>>
>>
>>
>> https://web.archive.org/web/20160518054801/https://codegangsta.io/blog/2014/05/19/my-thoughts-on-martini/
>>
>> On Sat, 2020-03-14 at 15:18 -0700, al...@oresoftware.com wrote:
>> > I am looking for answer to this SO overflow question:
>> >
>> >
>>
>> https://stackoverflow.com/questions/60679922/how-to-break-out-of-martini-middleware
>> >
>> > In essence, I am wondering how to send the response, and *not* invoke
>> > any of the subsequent middleware that is declared as part of the
>> > chain for that matching request.
>> > There is a boolean flag on http.Response called http.Response.Close.
>> >
>> > It's possible that martini reads from http.Response.Close to see if
>> > it should invoke the remaining middleware or not, but if so that
>> > seems like an imperfect practice/methodology.
>> >
>> > -alex
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "golang-nuts" group.
>> > To unsubscribe from this group and stop receiving emails from it,
>> > send an email to golan...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/golang-nuts/b0dbef78-8d0a-49c7-8feb-b3f96ef377ea%40googlegroups.com
>> > .
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/ae01f686-9b9e-4409-b1ce-6c23d83c7ed3%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/ae01f686-9b9e-4409-b1ce-6c23d83c7ed3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29Lt%2B0VAkU6XOzK3m%2Ba-VPRJmN1K1yC-vjwM5A4mEqQ5dfw%40mail.gmail.com.

Reply via email to