Go

Go standards: context, deps, stdlib, errors.

darknesskiller 0172069 2 files · 828 B Updated

File contents

Go

  1. Propagate the existing request context through downstream work.
  2. Use context.Background() only at process bootstrap or intentionally detached workers.
  3. Prefer explicit code and constructor injection.
  4. Avoid package-level mutable state.
  5. Wrap errors with useful context. Never silently ignore them.
  6. Match existing project patterns before adding helpers.
  7. Add tests for new behaviour.
  8. Avoid dependencies unless the standard library or installed packages fall short.

Completion: changed Go code preserves request context, has explicit dependencies and useful errors, follows local package patterns, and passes the narrowest relevant tests.

darknesskiller/skills/tree/main/skills/engineering/go commit 0172069b5a

Frequently asked questions

npx skillmds@latest add darknesskiller/go