Skip to content

New function - PMap<INPUT_TYPE><OUTPUT_TYPE>PtrErr

Choose a tag to compare

@logic-building logic-building released this 22 May 00:03
· 102 commits to master since this release
cd3796e

This new function takes a different type of input and returns a different type of output.
Eg.
r, err := PMapStrIntErr(fun1, []string{"ram", "jesus"})
func fun1(v string) (int, error) {
// some logic
return 0, nil
}

Auto-generated code for user-defined type has this functionality too.
Eg.
r, err := PMapStrEmployeeErr(fun1, []string{"ram", "jesus"})