gomock
CommunityGenerate Go mocks for interfaces
Authorbaphled
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill simplifies the process of creating and utilizing mock implementations for Go interfaces, enabling robust unit testing and component isolation.
Core Features & Use Cases
- Mock Generation: Automates the creation of mock objects for Go interfaces using GoMock.
- Interface Isolation: Facilitates testing of components by mocking their dependencies.
- Expectation Setting: Allows precise definition of expected method calls, arguments, and return values.
- Use Case: When testing a service that depends on a database repository interface, use this Skill to generate a mock repository, allowing you to test the service's logic without needing a live database.
Quick Start
Use the gomock skill to generate mocks for the 'UserRepository' interface defined in 'internal/repository/user.go'.
Dependency Matrix
Required Modules
mockgen
Components
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: gomock Download link: https://github.com/baphled/dotopencode/archive/main.zip#gomock Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.