golang-pro

Implements concurrent Go patterns, microservices, and performance-optimized code with idiomatic error handling.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/filippolmt/skills --skill golang-pro-filippolmt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-pro
Source: https://github.com/filippolmt/skills/tree/main/skills/golang-pro
Command: npx skills add https://github.com/filippolmt/skills --skill golang-pro-filippolmt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing production-grade Go requires mastering concurrency, generics, interface design, and testing discipline; this Skill provides senior-level Go guidance so you avoid goroutine leaks, race conditions, and non-idiomatic code. ## Core Features & Use Cases - Concurrent Programming: Implements goroutines, channels, worker pools, fan-out/fan-in, pipelines, and rate limiting with proper context cancellation and error propagation. - Idiomatic Go Design: Enforces small interfaces, generics with type constraints, functional options, and standard project layout with go.mod management. - Testing & Performance: Produces table-driven tests, benchmarks, fuzzing, race-detector validation, and pprof-based optimization. - Use Case: When building a gRPC microservice in Go 1.21+, invoke this Skill to design the interfaces, implement the service with context-aware concurrency, and deliver table-driven tests passing the race detector. ## Quick Start Use the golang-pro skill to implement a worker pool in Go with context cancellation, error propagation, and table-driven tests.

Frequently Asked Questions about golang-pro

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

FAQPage Schema
How do I manage goroutine lifecycles in Go?

Manage goroutine lifecycles by passing context.Context for cancellation, closing channels to signal completion, and using sync.WaitGroup to wait for workers. Always ensure goroutines have a clear exit path to prevent leaks.

How to write table-driven tests in Go?

Table-driven tests define a slice of structs with inputs and expected outputs, then loop through them using t.Run for subtests. Run tests with the -race flag to detect data races and aim for 80%+ coverage.

When should I use generics in Go?

Use generics in Go 1.18+ when the same logic applies to multiple types, such as data structures like stacks or functions like Map and Filter. Apply constraints like constraints.Ordered or union types to restrict type parameters.

Does Go error handling require wrapping errors?

Yes, wrap errors with fmt.Errorf and the %w verb so callers can inspect the chain with errors.Is and errors.As. Never ignore errors with blank assignment or use panic for normal error handling.

Why does my Go program have data races?

Data races occur when multiple goroutines access shared memory without synchronization. Detect them with go test -race and fix them using sync.Mutex, sync.RWMutex, channels, or atomic operations.