Skip to content

sort-non-slice

Default severity: error

sort.Slice, sort.SliceStable, and sort.SliceIsSorted accept any only for historical API reasons. The value must hold a slice; passing an array or another concrete type panics at runtime.

sort.Slice(array, less)
sort.Slice(values, less)