golang-popular-libraries

Recommends production-ready Go libraries and frameworks with a standard-library-first philosophy.

1|Updated May 25, 2020
One-click install
npx skills add https://github.com/titaneric/dotfiles --skill golang-popular-libraries-titaneric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-popular-libraries
Source: https://github.com/titaneric/dotfiles/tree/main/dot_agents/skills/golang-popular-libraries
Command: npx skills add https://github.com/titaneric/dotfiles --skill golang-popular-libraries-titaneric

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing the right Go dependency is hard: tutorials often push outdated or over-engineered libraries, and it is easy to add dependencies that merely wrap the standard library. This Skill guides library selection so you pick mature, maintained, idiomatic options and avoid unnecessary dependencies. ## Core Features & Use Cases - Curated library catalog: Vetted third-party libraries organized by category, including web frameworks (Gin, Echo, Chi), database drivers (pgx, lib/pq), ORMs (GORM, sqlc, Ent), logging (zap, zerolog, slog), messaging (franz-go, NATS), testing (testify, testcontainers-go), and more. - Standard library first: Reference of new stdlib packages (slices, maps, log/slog, math/rand/v2) and golang.org/x extensions so you only add external dependencies when they provide clear value. - Anti-pattern detection: Warns against abandoned libraries (e.g., Logrus), stdlib wrappers without added value, and premature optimization (e.g., reaching for jsoniter before profiling encoding/json). - Use Case: When starting a new Go REST API, ask which router to use and get a recommendation for chi when you want to stay close to net/http, rather than a full framework like Gin. ## Quick Start Ask the agent which Go library to use for a specific task, such as connecting to PostgreSQL or adding structured logging, and it will recommend a vetted option.

Frequently Asked Questions about golang-popular-libraries

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Which Go PostgreSQL driver should I use, pgx or lib/pq?

Use pgx (github.com/jackc/pgx) for new projects. It is faster than lib/pq and supports all PostgreSQL types and advanced features. lib/pq remains a valid alternative but pgx is the preferred choice.

What Go router should I use for a simple REST API?

Use chi (github.com/go-chi/chi) when you want a lightweight router that stays close to net/http with path parameters and middleware. Full frameworks like Gin or Echo fit better when you need more built-in functionality.

Should I use zap, zerolog, or log/slog for structured logging in Go?

Start with log/slog, the standard library structured logger available since Go 1.21. Choose zap or zerolog only when you need their specific advantages, such as zero-allocation logging in hot paths.

Is Logrus still a good choice for Go logging?

Logrus is deprecated and in maintenance mode, so it is not recommended for new projects. Use log/slog from the standard library, or zap and zerolog for performance-sensitive workloads.

When should I use sqlc instead of GORM in Go?

Use sqlc when you want compile-time SQL safety: it generates type-safe Go code from SQL with no runtime reflection. GORM uses runtime reflection, so SQL errors surface only at runtime.

Should I use jsoniter or sonic instead of encoding/json?

Start with encoding/json from the standard library. Only switch to jsoniter or sonic after profiling with pprof confirms JSON serialization is an actual bottleneck in your application.