3 ms·
Have been using this for quite some time - it has a nice API and is solid in production. I love the simplicity and it's small enough a codebase to quickly read
by njpatel 11y ago
Have been using this for quite some time - it has a nice API and is solid in production. I love the simplicity and it's small enough a codebase to quickly read and start hacking around.
- melle 11y agoDo you have any experience with gin? If so, why do you prefer echo over gin? Thanks
- zeemonkee3 11y agoPersonally I prefer two specific things: 1) echo is more middleware compatible - it's a PITA to use a lot of "standard" Go middleware (e.g. nosurf) with Gin, but echo has no problems with these. 2) the function signature for handlers always returns an error - so you have func(Context) error rather than func(Context). This feels a bit more like idiomatic Go, and makes it easier to write generic error middleware for your app. In terms of performance, for all intents and purposes they're about the same in real-world cases (the Go community for some odd reason loves bikeshedding over router benchmarks, but in the real world this is probably the least of your concerns).
- njpatel 11y agoAgreed - those two points, and the general simplicity of the Echo codebase, were why I ended up using it over the (many) other options for Go. Honestly haven't had the desire to check anything else out since, it's just always worked very well.