You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm always frustrated when I try to check if 2 slices (or maps) are equal in a type-safe way.
Describe the solution you'd like Equal handles slices and maps but EqualT can't be used in those cases as it doesn't compile. An extra SliceEqual, MapEqualT or similar name is needed.
Describe alternatives you've considered SliceSubsetT, MapContainsT or ElementsMatchT are not the same. I'm looking for the equivalent of slices.Equal() and maps.Equal.
Activity
[-]SliceEqualT[/-][+]SliceEqualT and MapEqualT[/+]fredbi commentedon Apr 13, 2026
Yes I totally agree, this would make the generic API more symmetric.
We could add:
This could be a nice addition to the release coming this month (2 more weeks to wrap things up for v2.5).
Bottom line:
feat(collection): added generic assertions for equality on slices and…
fredbi commentedon Apr 13, 2026
@Inuart something like this? #87
feat(collection): added generic assertions for equality on slices and…
Inuart commentedon Apr 13, 2026
oh wow I didn't expect such a fast reply and even a merged PR 💯
fredbi commentedon Apr 14, 2026
@Inuart yeah you raised the issue just the week I had picked to pour some more gas into the project… your ask was reasonable and simple to implement.
Now still have a few new things to do before I cut a v2.5 : https://go-openapi.github.io/testify/project/maintainers/roadmap/index.html