A Go code generator that automatically derives and maintains mundane functions like equality checks, deep copies, and functional operations from your types.
Derives and generates mundane golang functions that you do not want to maintain yourself
Parses Go code to detect unimplemented functions with 'derive' prefixes and generates accurate implementations, as shown for struct equality with pointers and nested conditionals.
Generates functions like deriveEqual and deriveDeepCopy that work recursively on complex types, including pointers and nested structs, ensuring thorough coverage without manual updates.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides derived functions for fmap, compose, and traverse, enabling functional patterns in Go, as detailed in the functional examples section of the README.
Regenerates functions when underlying types change, keeping derived implementations in sync with data structures and reducing maintenance errors from manual updates.
Many collection operations like deriveSort and deriveKeys are deprecated in favor of Go's generics, reducing the tool's relevance for new code and signaling obsolescence in parts of its feature set.
Requires running goderive as a separate step (e.g., 'goderive ./...') or via go generate, adding complexity to development workflows and CI/CD pipelines compared to pure Go code.
Can produce verbose and potentially inefficient code, such as the nested conditionals in the deriveEqual example, which might not match the performance or readability of hand-optimized implementations.