4 ms·
No real difference. They both deviate from standard interfaces (eg. https://pkg.go.dev/net/http#Handler https://pkg.go.dev/net/http#Handler) and do their own t
by fredrikholm 4y ago
No real difference.
They both deviate from standard interfaces (eg. https://pkg.go.dev/net/http#Handler https://pkg.go.dev/net/http#Handler) and do their own thing. This is fine, but unidiomatic.
The Go community steers towards 'one way of doing things', meaning that packages that don't reuse established interfaces tend to be less popular compared to the ones that do (gorilla, chi, or just std).
- molly0 4y agoThanks!
- verdverm 4y agoGorilla is no longer maintained I would argue that 'one way of doing things' is really at a much lower level, not at the package or module level. That was tied to "one way to loop, one way to place curly braces" Extending this idea to modules is not actually in line with how the GO team and community works.
- fredrikholm 4y ago> Gorilla is no longer maintained Ah, I wasn't aware! It was heavily used a few years ago. > Extending this idea to modules is not actually in line with how the ... community works This is not my experience (with the community). Packages that heavily reuse common interfaces (combinations of io.Reader|Writer|Closer|Seeker, http.Handler, http.ResponseWriter etc) tend to be more popular and recommended than packages that invent their own interfaces. That is, unless the recommendation is just 'stick to the std', which has been a knee-jerk reaction from the community (reddit, slack) for a lot of problems, especially concerning new comers.