* lint: pin golangci-lint version
* lint: use is.Empty where possible
* lint: use is.ElementsMatch for unsorted slices
* lint: remove redundant is.Len assertions
* lint: use is.Zero to assert zero structs
* fix: misc assertion issues
* lint: more consistent test case pattern
* fix: reversed expect/actual assert values
* lint: use is.ErrorIs and is.EqualError for errors
* Update golangci-lint version in workflow
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
* feat: Add NthOr and NthOrEmpty functions
This commit introduces two new functions, `NthOr` and `NthOrEmpty`, to the `find` package. These functions provide a safer way to access elements at a specific index in a slice, handling out-of-bounds scenarios gracefully.
- `NthOr`: Returns the element at the specified index or a provided fallback value if the index is out of bounds.
- `NthOrEmpty`: Returns the element at the specified index or the zero value for the slice's element type if the index is out of bounds.
* update readme
* feat: add first and firstOrZeroValue functions
* doc: update readme for First and FirstOrZeroValue functions
* feat: follow convention for return items and reuse base First function and add FirstOr
* doc: update documentation for First methods