Documentation
¶
Overview ¶
Package sortmigrate defines an analyzer that detects deprecated sort package function calls that can be replaced with slices package equivalents.
Analyzer sortmigrate ¶
sortmigrate: detect sort.Xyz calls that can use slices equivalents
This analyzer flags calls to deprecated sort package functions:
- sort.Strings(s) -> slices.Sort(s)
- sort.Ints(s) -> slices.Sort(s)
- sort.Float64s(s) -> slices.Sort(s)
- sort.Slice(s, less) -> slices.SortFunc(s, cmp)
- sort.SliceStable(s, less) -> slices.SortStableFunc(s, cmp)
- sort.SliceIsSorted(s, less) -> slices.IsSortedFunc(s, cmp)
- sort.IntsAreSorted(s) -> slices.IsSorted(s)
- sort.StringsAreSorted(s) -> slices.IsSorted(s)
- sort.Float64sAreSorted(s) -> slices.IsSorted(s)
Available since Go 1.21.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.