mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 13:02:14 +00:00
Update cobra to sort autogen code
We need determinism for hack/verify-gendocs.sh
This commit is contained in:
parent
7464575b17
commit
5b8a426d01
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -391,7 +391,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/spf13/cobra",
|
"ImportPath": "github.com/spf13/cobra",
|
||||||
"Rev": "c0da825198c75814463e1b3018e42e438b771a5b"
|
"Rev": "9cb5e8502924a8ff1cce18a9348b61995d7b4fde"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/spf13/pflag",
|
"ImportPath": "github.com/spf13/pflag",
|
||||||
|
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"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
@ -282,6 +283,7 @@ func writeRequiredFlag(cmd *Command, out *bytes.Buffer) {
|
|||||||
|
|
||||||
func writeRequiredNoun(cmd *Command, out *bytes.Buffer) {
|
func writeRequiredNoun(cmd *Command, out *bytes.Buffer) {
|
||||||
fmt.Fprintf(out, " must_have_one_noun=()\n")
|
fmt.Fprintf(out, " must_have_one_noun=()\n")
|
||||||
|
sort.Sort(sort.StringSlice(cmd.ValidArgs))
|
||||||
for _, value := range cmd.ValidArgs {
|
for _, value := range cmd.ValidArgs {
|
||||||
fmt.Fprintf(out, " must_have_one_noun+=(%q)\n", value)
|
fmt.Fprintf(out, " must_have_one_noun+=(%q)\n", value)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user