go-mockery
SKILL.md
go-mockery
- Install mockery dependency if not exists:
go get github.com/vektra/mockery. - Install testify if not already installed:
github.com/stretchr/testify.
When to use
I you need implement tests in golang with mocking features.
Instructions
- Create mocks of required interfaces using a mockery configuration file and the command
mockery. See the example for more information:references/examples/.mockery.yaml. - Create tests using mocks and testify. See the example for more information:
references/examples/main_test.go. - Run tests to check if all it's working good.
References
See more information here
- Mockery configuration example in
references/examples/.mockery.yaml. - Test example using mockery generated code in
references/examples/main_test.go. - Mockery official documentation in markdown:
Weekly Installs
1
Repository
karibulab/coding-agentsFirst Seen
6 days ago
Security Audits
Installed on
windsurf1
amp1
cline1
opencode1
cursor1
kimi-cli1