mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-22 00:13:52 +01:00
fix incorrect use of sort.StringSlice
A newer version of staticheck found these: > SA4029: sort.StringSlice is a type, not a function, and > sort.StringSlice(variants) doesn't sort your values; consider using > sort.Strings instead (staticcheck)
This commit is contained in:
parent
a6aa610165
commit
a91fb873e4
@ -57,7 +57,7 @@ func (f *zabsFilterFlags) registerZabsFilterFlags(s *pflag.FlagSet, verb string)
|
||||
for v := range endpoint.AbstractionTypesAll {
|
||||
variants = append(variants, string(v))
|
||||
}
|
||||
variants = sort.StringSlice(variants)
|
||||
sort.Strings(variants)
|
||||
variantsJoined := strings.Join(variants, "|")
|
||||
s.Var(&f.Types, "type", fmt.Sprintf("only %s holds of the specified type [default: all] [comma-separated list of %s]", verb, variantsJoined))
|
||||
|
||||
|
@ -168,7 +168,7 @@ func (s AbstractionTypeSet) String() string {
|
||||
for i := range s {
|
||||
sts = append(sts, string(i))
|
||||
}
|
||||
sts = sort.StringSlice(sts)
|
||||
sort.Strings(sts)
|
||||
return strings.Join(sts, ",")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user