Use sort.Strings

This commit is contained in:
Michael Eischer 2020-03-06 23:22:10 +01:00
parent 2ddb7ffb7e
commit 337725c354
2 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ func uniqueNodeNames(tree1, tree2 *restic.Tree) (tree1Nodes, tree2Nodes map[stri
uniqueNames = append(uniqueNames, name)
}
sort.Sort(sort.StringSlice(uniqueNames))
sort.Strings(uniqueNames)
return tree1Nodes, tree2Nodes, uniqueNames
}

View file

@ -51,7 +51,7 @@ func GroupSnapshots(snapshots Snapshots, options string) (map[string]Snapshots,
if GroupByTag {
tags = sn.Tags
sort.StringSlice(tags).Sort()
sort.Strings(tags)
}
if GroupByHost {
hostname = sn.Hostname
@ -60,7 +60,7 @@ func GroupSnapshots(snapshots Snapshots, options string) (map[string]Snapshots,
paths = sn.Paths
}
sort.StringSlice(sn.Paths).Sort()
sort.Strings(sn.Paths)
var k []byte
var err error