mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 13:48:09 +08:00
11 lines
207 B
Go
11 lines
207 B
Go
package main
|
|
import (
|
|
"sort"
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
fnums := []uint64{0,12,2,4,5,5,2,uint64(10)}
|
|
sort.Slice(fnums, func(i, j int) bool { return fnums[i] < fnums[j] })
|
|
fmt.Println(fnums)
|
|
} |