go-create-usecase
Go Create UseCase
Generate a use case that depends on ports (interfaces), not concrete implementations.
Create the file
Create one file per operation in:
internal/modules/<module>/usecase/<operation>_usecase.go
Use:
- package:
usecase - struct name:
<Operation>UseCase - method name:
Execute
Naming (CRITICAL)
Apply consistent naming for every use case.
More from cristiano-pacheco/ai-rules
go-unit-tests
Generate Go unit tests using testify suite/assert patterns. Use when writing test suites with mocks, testing standalone functions, or adding unit test coverage.
25go-integration-tests
Generate Go integration tests with real database/infrastructure via itestkit containers. Use when testing use cases against real databases, verifying end-to-end flows, or adding integration test coverage.
15go-cache
Generate Redis-backed Go cache. Invoke whenever user mentions cache or Redis.
11go-chi-handler
Generate Chi HTTP handlers, use case orchestration, Use for REST endpoint handlers or web http handlers.
10creating-cursor-rules-skill
Expert guidance for creating effective Cursor IDE rules with best practices, patterns, and examples
9go-chi-router
Generate Chi router files with route registration and Fx wiring. Use for CRUD routes, custom endpoints, versioned APIs, route groups, or any HTTP route setup.
9