go-mapper
Go Mapper
Generate pure mapper functions for GO modular architecture.
When to Use
- Map HTTP request DTOs to use case inputs
- Map persistence models to HTTP response DTOs
- Map between any two struct representations across layers
- Convert a slice of structs to a slice of another struct
- Any struct-to-struct transformation that lives in a module
Location
All mapper files live in internal/modules/<module>/mapper/.
One file per domain concept: <name>_mapper.go (e.g., user_mapper.go).
Function Signature Pattern
More from cristiano-pacheco/ai-tools
go-gorm-model
Generate GORM persistence models. Use when creating database models using GORM.
78go-chi-handler
Generate Chi HTTP handlers, use case orchestration, Use for REST endpoint handlers or web http handlers.
26go-usecase
Generate use cases. Use when creating business operations, CRUD use cases, or any Execute-based module operation.
22go-enum
Generate type-safe enums with validation. Use when creating enums, defining constants, or adding enum types.
20go-cache
Generate Redis-backed Go cache. Invoke whenever user mentions cache or Redis.
20go-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.
20