diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-05 17:38:04 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-05 17:38:04 +0200 |
commit | 96eb7acf242f3ea3bceb547c1190ce0882832314 (patch) | |
tree | d6384ce455a01a0799d531020d6f7a2532435651 /ui/tunnelspage.go | |
parent | ui: attach shortcuts to their windows (diff) | |
download | wireguard-windows-96eb7acf242f3ea3bceb547c1190ce0882832314.tar.xz wireguard-windows-96eb7acf242f3ea3bceb547c1190ce0882832314.zip |
ui: use natural sorting order
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | ui/tunnelspage.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go index 8bcf6aaa..c2521a6b 100644 --- a/ui/tunnelspage.go +++ b/ui/tunnelspage.go @@ -314,8 +314,7 @@ func (tp *TunnelsPage) importFiles(paths []string) { // Add in reverse order so that the first one is selected. sort.Slice(unparsedConfigs, func(i, j int) bool { - //TODO: use proper tunnel string sorting/comparison algorithm, as the other comments indicate too. - return strings.Compare(unparsedConfigs[i].Name, unparsedConfigs[j].Name) > 0 + return conf.TunnelNameIsLess(unparsedConfigs[j].Name, unparsedConfigs[i].Name) }) existingTunnelList, err := service.IPCClientTunnels() |