[#381] zfs: ListFilesystemVersions: make list filesystems version invocation deterministic
fixes #381 ref #379
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -40,6 +41,7 @@ func (s VersionTypeSet) zfsListTFlagRepr() string {
|
|||||||
for t := range s {
|
for t := range s {
|
||||||
types = append(types, t.String())
|
types = append(types, t.String())
|
||||||
}
|
}
|
||||||
|
sort.StringSlice(types).Sort()
|
||||||
return strings.Join(types, ",")
|
return strings.Join(types, ",")
|
||||||
}
|
}
|
||||||
func (s VersionTypeSet) String() string { return s.zfsListTFlagRepr() }
|
func (s VersionTypeSet) String() string { return s.zfsListTFlagRepr() }
|
||||||
|
|||||||
Reference in New Issue
Block a user