Improve kubectl help with examples.

This commit is contained in:
Phillip Wittrock
2017-01-06 12:05:08 -08:00
parent 8ef6902516
commit dc2fffe5d4
10 changed files with 113 additions and 29 deletions

View File

@@ -24,10 +24,19 @@ import (
"github.com/spf13/cobra"
)
var (
options_example = templates.Examples(`
# Print flags inherited by all commands
kubectl options`)
)
// NewCmdOptions implements the options command
func NewCmdOptions(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "options",
Use: "options",
Short: "Print the list of flags inherited by all commands",
Long: "Print the list of flags inherited by all commands",
Example: options_example,
Run: func(cmd *cobra.Command, args []string) {
cmd.Usage()
},