We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( "fmt" "github.com/samber/lo" ) type intSlice []int func main() { s1 := intSlice{3, 4, 5} s2 := lo.Filter(s1, func(_ int, _ int) bool { return true }) i1 := any(s2) s3 := i1.(intSlice) fmt.Printf("s3: %#v", s3) }
^^ The above panics because s2 is of type []int, not intSlice.
[]int
intSlice
Filter() seems like it should return intSlice here instead.
Filter()
The text was updated successfully, but these errors were encountered:
Thats because intslice is already a slice. You will get a slice of slices.
Sorry, something went wrong.
@jcbritobr See the linked PR for a fix with test.
No branches or pull requests
^^ The above panics because s2 is of type
[]int
, notintSlice
.Filter()
seems like it should returnintSlice
here instead.The text was updated successfully, but these errors were encountered: