github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/staticcheck/sa4029/testdata/src/example.com/CheckIneffectiveSort/CheckIneffectiveSort.go (about) 1 package pkg 2 3 import "sort" 4 5 func fn() { 6 var a []string 7 var b []float64 8 var c sort.StringSlice 9 10 a = sort.StringSlice(a) //@ diag(re`sort\.StringSlice is a type.+consider using sort\.Strings instead`) 11 b = sort.Float64Slice(b) //@ diag(re`sort\.Float64Slice is a type.+consider using sort\.Float64s instead`) 12 c = sort.StringSlice(c) 13 }