Go Community Chooses Best Libraries of 2024
The annual Go Developer Survey 2024 voting has concluded, and the Golang developer community has named the best libraries and tools of the year. Over 5,000 developers from around the world participated in the survey, evaluating projects based on performance, ease of use, documentation, and support activity. We have compiled the key categories and winners that every Go developer should know about.
Categories and Winners
- Best Web Framework: Gin — retains its leadership for the third consecutive year. Developers praise its speed, minimalist API, and excellent compatibility with middleware. In second place is Fiber (inspired by Express.js), and in third is Echo.
- Best Database Library: pgx — an advanced driver for PostgreSQL. It won due to support for connection pooling, prepared statements, and native integration with Go contexts. Among ORMs, GORM leads, but pgx surpassed it in the "pure" drivers category.
- Best CLI Tool: Cobra — the de facto standard for building command lines in Go. Noted for its simplicity in creating nested commands, autocompletion, and documentation generation. Second place goes to Viper (configuration management).
- Best Testing Library: testify — a set of assertions and mock objects. It won thanks to its intuitive syntax and seamless integration with the standard testing package. Also noted were go-sqlmock and gomock.
- Best Logging Library: zap from Uber — maintains its position due to high performance and structured logs. In second place is zerolog, and in third is logrus.
- Best HTTP Client Library: fasthttp — optimized for high-load scenarios. Developers praise it for low memory consumption and speed, although they note that the API is more complex than the standard net/http.
Newcomers of the Year: Unexpected Discoveries
This year, two relatively young projects broke into the top 10:
- Bubble Tea — a framework for creating TUIs (Text User Interfaces) in Go. Inspired by the Elm architecture, it allows for quickly building terminal applications with hot reload. It received the "Best CLI Visualization Tool" award.
- Huma — a library for building REST APIs with automatic generation of OpenAPI specifications. Noted for its strict typing and built-in request validation.
Trends of 2024 in the Go Ecosystem
Analysis of the voting reveals several key trends:
- Growing popularity of observability tools: libraries for tracing (OpenTelemetry) and monitoring (Prometheus client) entered the top by number of mentions.
- Strengthening positions of async workers: Asynq (task queue on Redis) and machinery surpassed older solutions for background tasks.
- Transition to Go 1.22+: many winners have already adapted their projects to the language's new capabilities — improved loops, early returns, and