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
go 1.23.1 windows amd64
go env
not need
define type: type QuickSets[T any] []*QuickSet[T]
add func: func (qs *QuickSets[T]) Clac(cmpf func(a, b T) int) (c []T) { as1 := [][]T{} for qi, a := range qs { as1 = append(as1, qs[qi]) } return c }
cannot range over qs (variable of type *QuickSets[T])
make it can range
The text was updated successfully, but these errors were encountered:
Try *qs, you can't range nor index pointer to slices to begin with:
*qs
a := []int{42} b := &a for range b // does not work b[0] = 1337 // does not work
Sorry, something went wrong.
No branches or pull requests
Go version
go 1.23.1 windows amd64
Output of
go env
in your module/workspace:What did you do?
define type:
type QuickSets[T any] []*QuickSet[T]
add func:
func (qs *QuickSets[T]) Clac(cmpf func(a, b T) int) (c []T) {
as1 := [][]T{}
for qi, a := range qs {
as1 = append(as1, qs[qi])
}
return c
}
What did you see happen?
cannot range over qs (variable of type *QuickSets[T])
What did you expect to see?
make it can range
The text was updated successfully, but these errors were encountered: