我有一个充满类型版本的数组String,需要排序,但当前的排序方法排序不正确
String
apiVersions := []string{"1.4", "1.12", "1.21", "1.8"}
在排序时apiVersions,数组看起来像["1.12", "1.21", "1.4", "1.8"]而不是["1.4", "1.8", "1.12", "1.21"]
apiVersions
["1.12", "1.21", "1.4", "1.8"]
["1.4", "1.8", "1.12", "1.21"]
肥皂起泡泡
相关分类