1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-28 06:29:29 +01:00

Update vendor dependencies.

This commit is contained in:
Avesh Agarwal
2017-07-30 12:34:27 -04:00
parent 1fb6d17852
commit 68889104b3
48 changed files with 2785 additions and 5665 deletions

View File

@@ -6,8 +6,6 @@ Generating man pages from a cobra command is incredibly easy. An example is as f
package main
import (
"log"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
)
@@ -17,10 +15,7 @@ func main() {
Use: "test",
Short: "my test program",
}
err := doc.GenMarkdownTree(cmd, "/tmp")
if err != nil {
log.Fatal(err)
}
doc.GenMarkdownTree(cmd, "/tmp")
}
```
@@ -34,22 +29,18 @@ This program can actually generate docs for the kubectl command in the kubernete
package main
import (
"log"
"io/ioutil"
"os"
"k8s.io/kubernetes/pkg/kubectl/cmd"
kubectlcmd "k8s.io/kubernetes/pkg/kubectl/cmd"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"github.com/spf13/cobra/doc"
)
func main() {
kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
err := doc.GenMarkdownTree(kubectl, "./")
if err != nil {
log.Fatal(err)
}
cmd := kubectlcmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
doc.GenMarkdownTree(cmd, "./")
}
```
@@ -61,10 +52,7 @@ You may wish to have more control over the output, or only generate for a single
```go
out := new(bytes.Buffer)
err := doc.GenMarkdown(cmd, out)
if err != nil {
log.Fatal(err)
}
doc.GenMarkdown(cmd, out)
```
This will write the markdown doc for ONLY "cmd" into the out, buffer.
@@ -113,3 +101,4 @@ linkHandler := func(name string) string {
return "/commands/" + strings.ToLower(base) + "/"
}
```