uber-go-style

Installation
SKILL.md

When writing or modifying Go code, follow these rules based on the Uber Go Style Guide.

Guidelines

Interfaces

  • Never use pointers to interfaces; pass interfaces as values
  • Verify interface compliance at compile time: var _ http.Handler = (*Handler)(nil)

Receivers

  • Value receivers can be called on pointers and values; pointer receivers only on pointers or addressable values

Mutexes

  • Zero-value sync.Mutex and sync.RWMutex are valid; don't use new(sync.Mutex)
  • Don't embed mutexes in structs; use a named field mu sync.Mutex

Slices and Maps at Boundaries

  • Copy slices and maps received as arguments if you store them (prevent caller mutation)
  • Copy slices and maps before returning them if they expose internal state
Installs
4
GitHub Stars
1
First Seen
Feb 13, 2026
uber-go-style — ferhatelmas/goodies