{"repo":"awalterschulze/goderive","free":true,"listed":false,"github":"https://github.com/awalterschulze/goderive","clone":"git clone https://github.com/awalterschulze/goderive.git","description":"Derives and generates mundane golang functions that you do not want to maintain yourself","language":"Go","stars":1261,"topics":["golang","generator","deriving","functional-programming","generics"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"goderive goderive derives mundane golang functions that you do not want to maintain and keeps them up to date. It does this by parsing your go code for functions, which are not implemented, and then generates these functions for you by deriving their implementations from the input parameter types. Examples In the following code the deriveEqual function will be spotted as a function that was not implemented (or was previously derived) and has a prefix deriveEqual . goderive will then generate the following code in a derived.gen.go file in the same package: Recursive Examples: - Equal - Compare - DeepCopy - GoString - Hash Set Examples: - Keys - Sort - Unique - Set - Min - Max - Contains - Intersect - Union Functional Examples: - Compose - Mem - Traverse - ToError Concurrency Examples: - Pipeline - Do Functions Recursive Functions: - Equal - deriveEqual(T, T) bool - deriveEqual(T) func(T) bool - Compare - deriveCompare(T, T) int - deriveCompare(T) func(T) int - DeepCopy - deriveDeepCopy(dst T, src T) - deriveDeepCopy(dst []T, src []T) - deriveDeepCopy(dst map[A]B, src map[A]B) - Clone deriveClone(T) T - GoString deriveGoString(T) string - Hash deriveHash(T) uint64 Functional Functions: - Fmap - deriveFmap(func(A) B, []A) []B - deriveFmap(func(rune) B, string) []B - deriveFmap(func(A) B, func() (A, error)) (B, error) - deriveFmap(func(A) (B, error), func() (A, error)) (func() (B, error), error) - deriveFmap(func(A), func() (A, error)) error - deriveFmap(func(A) (B, c, d, ...), f","default_branch":null,"files":null,"tree":[],"storefront":"/r/awalterschulze","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/awalterschulze/goderive/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}