thoas / go-funk

A modern Go utility library which provides helpers (map, find, contains, filter, ...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept comparison function to contains/difference/etc.

adammw opened this issue · comments

Under the hood, funk requires the same types so that it can call reflect.DeepEqual to check for equality. It would be nice to be able to pass in a custom comparison method such that it could for example know how to compare different types, or know which fields to ignore when making a comparison for certain types.