Generate type-safe Go converters by defining interface function signatures, avoiding runtime reflection.
Goverter is a Go code generator that creates type-safe converters between different data structures. It allows developers to define conversion rules through simple interface declarations, then automatically generates efficient conversion code without relying on runtime reflection.
Go developers who need to convert between complex data types, such as when mapping API request/response models, database entities to domain objects, or between different package structures.
Developers choose Goverter over reflection-based alternatives because it generates explicit, type-safe conversion code at compile time, ensuring better performance and catching conversion errors early during code generation rather than at runtime.
Generate type-safe Go converters by defining function signatures.
Generates explicit conversion code that avoids reflection at runtime, leading to faster execution compared to reflection-based alternatives, as emphasized in the 'Fast execution' feature.
Catches errors early during code generation, such as unmapped fields or unsafe type conversions, preventing runtime failures and enhancing reliability.
Allows implementation of custom converter methods for complex logic, enabling handling of edge cases beyond automatic mapping, as documented in the extend section.
Handles slices, maps, named types, primitives, pointers, and structs with matching fields, covering a wide range of Go data structures seamlessly.
Requires running the goverter CLI to regenerate converters whenever source or target types change, adding a step to the development workflow that can be cumbersome in fast-evolving codebases.
Conversions must be predefined in interfaces, making it unsuitable for dynamic scenarios where data structures are not known at compile time or require ad-hoc transformations.
Relies on Go comments (e.g., //goverter:map) for configuration, which can be less intuitive and more error-prone than using struct tags or other standard Go patterns.
Generate Go client and server boilerplate from OpenAPI 3 specifications
.NET LINQ capabilities in Go
Jennifer is a code generator for Go
GoWrap is a command line tool for generating decorators for Go interfaces
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.