LabscoMCP early access ↗

The shapes experienced Go code keeps reaching for — how a constructor takes its options, how a service shuts down cleanly, when to give up on a slow call — and when the pattern is not worth it yet.

WHEN TO USE

SCOPE

USE FOR

  • Design a constructor with functional options instead of a long positional parameter list.
  • Decide whether a failure case should return an error or panic.
  • Add a timeout to every external call so a slow upstream can't hang a goroutine forever.
  • Stream a million-row transfer instead of loading it all into memory.
  • Choose an architecture style — clean, hexagonal, DDD, or flat — for a new service.

NOT FOR

  • Not for wiring a DI container or comparing DI libraries in depth.
  • Not for error wrapping, errors.Is/As matching, or structured-logging mechanics.