skills/smithery.ai/Go Ecosystem

Go Ecosystem

Installation
SKILL.md

Go Ecosystem

Core Concepts

  • Errors are values: Handle explicitly with if err != nil; use %w to wrap for errors.Is/errors.As
  • Interfaces: Accept interfaces, return concrete types; define where used, not implemented; keep small (1-3 methods)
  • Concurrency: Goroutines for concurrency, channels for communication, context.Context for cancellation
  • Zero values: Design types so zero value is useful (var buf bytes.Buffer ready to use)

Naming Conventions

  • Packages: lowercase, single-word (no underscores)
  • Exported: PascalCase; Unexported: camelCase
  • Single-method interfaces: method name + "er" (Reader, Writer, Handler)
  • Acronyms uppercase: HTTPClient, userID
  • No "Get" prefix for getters: func (u *User) Name() string

Error Handling

Installs
–
First Seen
–
Go Ecosystem from smithery.ai