go-patterns

Guide Go programming with best practices, idioms, and design patterns.

1|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/eroslifestyle/Claude-Orchestrator-Plugin --skill go-patterns-eroslifestyle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-patterns
Source: https://github.com/eroslifestyle/Claude-Orchestrator-Plugin/tree/main/github-package/skills/go-patterns
Command: npx skills add https://github.com/eroslifestyle/Claude-Orchestrator-Plugin --skill go-patterns-eroslifestyle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on writing idiomatic, efficient, and maintainable Go code, helping developers avoid common pitfalls and adopt best practices.

Core Features & Use Cases

  • Error Handling: Learn robust patterns for checking, wrapping, and comparing errors.
  • Concurrency: Implement safe and efficient concurrent operations using goroutines and channels.
  • Struct Design: Utilize patterns like Functional Options and Embedding for better composition.
  • Testing: Employ table-driven tests and HTTP testing strategies.
  • Use Case: When writing a new Go service, consult this Skill for recommended patterns on handling API request errors, managing background tasks, and structuring your project.

Quick Start

Show me the recommended way to handle errors when calling an external API in Go.

Frequently Asked Questions about go-patterns

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

FAQPage Schema
How do I handle errors when calling an external API in Go?

Robust error handling in Go uses `errors.Is` and `errors.As` to check and compare errors, and wrapping to add context. This Skill provides patterns for safely managing API request failures and avoiding common pitfalls.

What is the best way to manage concurrency in Golang using worker pools?

Managing concurrency in Golang is best achieved using goroutines, channels, and `errgroup`. This Skill details how to implement safe and efficient concurrent operations and background tasks using worker pools.

How do I structure Go structs using functional options and embedding?

Structuring Go structs with functional options and embedding allows for better composition and flexible configuration. This Skill guides you through effective struct design patterns to write maintainable Go code.

Why does my table-driven test fail to cover HTTP testing strategies in Go?

Table-driven tests fail to cover HTTP strategies when they lack proper request mocking and assertion structuring. This Skill outlines robust testing strategies to effectively implement table-driven tests and HTTP testing in Go.

What are common Golang performance optimization mistakes to avoid?

Common Golang performance mistakes involve inefficient concurrency management and improper struct design. This Skill details performance optimizations and highlights frequent mistakes to avoid in Go development.

Can I use functional options for configuring a new Go service?

Yes, you can use functional options for configuring a new Go service. This Skill provides guidance on utilizing functional options and embedding for effective struct design and better composition in your Go projects.