preference options sort 🍉

This commit is contained in:
Liang Ding 2014-12-08 17:43:25 +08:00
parent 2333e1d422
commit a1fde02879
3 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"sort"
"strconv" "strconv"
"strings" "strings"
"text/template" "text/template"
@ -462,6 +463,8 @@ func GetEditorThemes() []string {
ret = append(ret, name[:strings.LastIndex(name, ".")]) ret = append(ret, name[:strings.LastIndex(name, ".")])
} }
sort.Strings(ret)
return ret return ret
} }
@ -477,5 +480,7 @@ func GetThemes() []string {
ret = append(ret, name[:strings.LastIndex(name, ".")]) ret = append(ret, name[:strings.LastIndex(name, ".")])
} }
sort.Strings(ret)
return ret return ret
} }

View File

@ -19,6 +19,7 @@ import (
"encoding/json" "encoding/json"
"io/ioutil" "io/ioutil"
"os" "os"
"sort"
"strings" "strings"
"github.com/golang/glog" "github.com/golang/glog"
@ -90,5 +91,7 @@ func GetLocalesNames() []string {
ret = append(ret, name) ret = append(ret, name)
} }
sort.Strings(ret)
return ret return ret
} }

View File

@ -19,6 +19,7 @@ import (
"path" "path"
"path/filepath" "path/filepath"
"runtime" "runtime"
"sort"
"strings" "strings"
) )
@ -61,6 +62,8 @@ func (*mygo) GetGoFormats() []string {
ret = append(ret, "goimports") ret = append(ret, "goimports")
} }
sort.Strings(ret)
return ret return ret
} }