[#381] zfs: ListFilesystemVersions: make list filesystems version invocation deterministic

fixes #381
ref #379
This commit is contained in:
Christian Schwarz 2020-11-01 13:59:21 +01:00
parent 0a2dea05a9
commit c420f3c909

View File

@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
"sort"
"strconv"
"strings"
"sync"
@ -40,6 +41,7 @@ func (s VersionTypeSet) zfsListTFlagRepr() string {
for t := range s {
types = append(types, t.String())
}
sort.StringSlice(types).Sort()
return strings.Join(types, ",")
}
func (s VersionTypeSet) String() string { return s.zfsListTFlagRepr() }