Echo
chi
Our great sponsors
- InfluxDB - Access the most powerful time series database as a service
- ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
- CodiumAI - TestGPT | Generating meaningful tests for busy devs
- SonarQube - Static code analysis for 29 languages.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Echo
-
It's so easy to learn
Here I'm not really sure what you're referring to: * You can set request timeout and it has nothing to do with whether you handled your error or not. * In most cases you either bubble it up the callstack or do something with error in place you o received it i.e. you switch to default value, retry or sth along those lines. In some cases frameworks like echo will translate error into 5XX response for you if you don't do anything with it in top level handler. * Panics are recoverable. Also in case your handler panics it won't crash entire server -> stdlib HTTP server just closes connection, frameworks might even provide panic handler which will return 5XX instead of nothing. * try/catch doesn't really solve anything I mentioned here ¯_(ツ)_/¯. You just hope somebody caught your exception somewhere else.
- What is the ASP.NET Core Web API equivalent in Go?
-
How to build an API using Go
Now that we have set up the Go environment, we can start building our API. The first step is to choose a framework. There are several popular frameworks for building APIs in Go, such as Gorilla mux, Echo, and Gin. For this article, we'll use Gorilla mux.
-
what's your recommended router? chi, mux, something else?
echo! It's really easy it to use for simple routes but you can as well define routing groups as I did here.
-
go-mir - a toolkit to develop RESTful API backend service like develop service of gRPC
Mir is a toolkit to develop RESTful API backend service like develop service of gRPC. It adapt some HTTP framework sush as Gin, Chi, Hertz, Echo, Iris, Fiber, Macaron, Mux, httprouter。
-
I've just started learning Golang, and I'm struggling to choose a framework.
I use Echo at my job, we have migrated from GoKit and is pretty good. https://echo.labstack.com
-
Tools besides Go for a newbie
IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
-
Echo VS Don - a user suggested alternative
2 projects | 15 Mar 2023
-
Looking to start learning Golang as a backend developer, where should I begin?
The little go book, Maybe that can help you a little bit, and then you could try echo High performance, extensible, minimalist Go web framework. 👌🏻 It has good documentation.
-
How to save money with hexagonal architecture and SST
The project uses echo for serve as an http server, and we saved the config at the api/server.go file:
chi
-
How to start a Go project in 2023
A better answer would be some recommendations for component pieces. e.g., I will need most of the essential things in https://github.com/go-chi/chi, so why bother rolling a version myself? The same goes for things like sqlx. I'm averse to leaning on a "framework," but do find good value in targeted libraries.
-
Dumb question about APIs, Mux and Go
More minimalist approach: https://github.com/go-chi/chi
-
Why is gin so popular?
Chi has a bunch of pre-rolled middleware functions too: https://github.com/go-chi/chi/tree/master/middleware
-
what's your recommended router? chi, mux, something else?
I don't use chi anymore ever since this happened.
- Best approach for a monolithic web app?
-
go-mir - a toolkit to develop RESTful API backend service like develop service of gRPC
Mir is a toolkit to develop RESTful API backend service like develop service of gRPC. It adapt some HTTP framework sush as Gin, Chi, Hertz, Echo, Iris, Fiber, Macaron, Mux, httprouter。
-
Tools besides Go for a newbie
IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
-
chi VS Don - a user suggested alternative
2 projects | 15 Mar 2023
-
Golang tech stack
Chi
Chi for routing
What are some alternatives?
Gin - Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Fiber - ⚡️ Express inspired web framework written in Go
mux - A powerful HTTP router and URL matcher for building Go web servers with 🦍
Iris - The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio :rocket:
httprouter - A high performance HTTP request router that scales well
Beego - beego is an open-source, high-performance web framework for the Go programming language.
go-kit - A standard library for microservices.
Revel - A high productivity, full-stack web framework for the Go language.