在Go中对未签名的int进行排序

I want to sort a slice of []uint. Does this make sense? Is there something I'm missing about uints that make them unsortable? I notice that the sort package has an IntSlice and Float64Slice, but nothing for uint.

If uints are sortable, then can I just copy the same implementation for Len(), Less(i, j int) and Swap(i, j int) that they've used for the sort.IntSlice?

As for 1.7, you can sort any slice that implements sort.Interface for an alias type of your []uint slice and using sort.Sort(Interface) . In Go 1.8, you will have the option to use sort.Slice. See the example here