go-unit-tests

Installation
SKILL.md

Go Unit Tests

Generate comprehensive Go unit tests following testify patterns and the Arrange-Act-Assert methodology.

When to Use

  • Write test suites for structs with dependencies
  • Test standalone functions and value objects
  • Create mock-based unit tests
  • Add unit test coverage to existing code

Before Writing Tests

Identify the following before writing any code:

  1. Pattern — Use a test suite (Pattern 1) for structs with dependencies; use standalone functions (Pattern 2) for simple functions or value objects
  2. Dependencies — Which dependencies need mocks; which can use real instances
  3. Test cases — Happy path, error conditions, and edge cases
Related skills
Installs
16
First Seen
Feb 24, 2026