mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-02 11:02:16 +00:00
Update cobra to sort autogen code
We need determinism for hack/verify-gendocs.sh
This commit is contained in:
2
Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.go
generated
vendored
2
Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
@@ -282,6 +283,7 @@ func writeRequiredFlag(cmd *Command, out *bytes.Buffer) {
|
||||
|
||||
func writeRequiredNoun(cmd *Command, out *bytes.Buffer) {
|
||||
fmt.Fprintf(out, " must_have_one_noun=()\n")
|
||||
sort.Sort(sort.StringSlice(cmd.ValidArgs))
|
||||
for _, value := range cmd.ValidArgs {
|
||||
fmt.Fprintf(out, " must_have_one_noun+=(%q)\n", value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user