export `includeElement`
Summary
The assertion package is useful for non-test assertions using things such as assert.ObjectsAreEqualValues. Similarly it would be useful to export the assert.includeElement function that is used by assert.Contains to be used in a non test environment.
That's a very inefficient Contains function to use on a known type, I don't think it's use outside of tests should be encouraged. Have you considered using https://pkg.go.dev/golang.org/x/exp/slices#Contains ?
Ahhh generics, good call. Thank you!
On a separate item, includeElement is also within tests. Sometimes a mock function processing a call needs to perform different assertions based on whether or not a particular item is in an array (and the array is of type []interface{}) such as args passed to a sql.Exec(query, args...) call. There is still a use within tests.
The slices package will appear in stdlib with Go 1.21 with a Contains function. So I expect that the need described here will disappear.
Anyway, as a general rule, I think that using testify beyond a testing context is out of scope for this project. If some functions of testify are useful outside a testing context they must be extracted into a separate project. testify is for testing.