Versions in this module Expand all Collapse all v1 v1.18.0 May 10, 2020 Changes in this version + var GenKubectlDir = flag.String("gen-kubectl-dir", "generators", "Directory containing kubectl files") + var KubernetesVersion = flag.String("kubernetes-version", "", "Version of Kubernetes to generate docs for.") + var ShowUsage = flag.Bool("show-usage", false, "Show original usage (for debugging)") + func AsDocbook() + type Arg struct + Choice *string + End bool + Name string + Rep *string + func (o *Arg) AsDocbook(w io.Writer) + type Category struct + Commands []*ToCCommand + Include string + Name string + type Command struct + Description string + Examples []Example + InheritedOptions Options + Name string + Options Options + Path string + SeeAlso []string + Synopsis string + Usage string + func NewCommand(c *cobra.Command, path string) *Command + func (o *Command) AsDocbook(w io.Writer, config *ToCCommand) + func (o *Command) GetAllInheritedOptionNames() (options []string) + func (o *Command) GetAllOptionNames() (options []string) + func (o *Command) GetInheritedOption(name string) *Option + func (o *Command) GetOption(name string) *Option + type Commands []*Command + func NewSubCommands(c *cobra.Command, path string) Commands + func (a Commands) Len() int + func (a Commands) Less(i, j int) bool + func (a Commands) Swap(i, j int) + type Doc struct + Filename string + type Example struct + Content string + Title string + func SplitExamples(examples string) (result []Example) + type KubectlSpec struct + TopLevelCommandGroups []TopLevelCommands + func GetSpec() KubectlSpec + func NewKubectlSpec(c *cobra.Command) KubectlSpec + func (o *KubectlSpec) GetAllCommandNames() (commands []string) + func (o *KubectlSpec) GetCommand(name string) *Command + type Manifest struct + Copyright string + Docs []Doc + Title string + type Option struct + DefaultValue string + Name string + Shorthand string + Type string + Usage string + func (op *Option) AsDocbook(w io.Writer, config *ToCOption) + func (op *Option) AsDocbookDetails(w io.Writer, config *ToCOption) + type Options []*Option + func NewOptions(flags *pflag.FlagSet) Options + func (a Options) Len() int + func (a Options) Less(i, j int) bool + func (a Options) Swap(i, j int) + type OptionsGroup struct + Name string + Options []ToCOption + type ToC struct + Categories []*Category + func (o *ToC) AddMissingCommands(spec *KubectlSpec) + func (o *ToC) AddMissingOptions(spec *KubectlSpec) + func (o *ToC) AddMissingUsages(spec *KubectlSpec) + func (o *ToC) GetAllCommandNames() (commands []string) + type ToCCommand struct + Args []Arg + Name string + OptionsGroups []OptionsGroup + Usage string + func (o *ToCCommand) AddMissingOptions(spec *Command) + func (o *ToCCommand) AddMissingUsage(spec *Command) + func (o *ToCCommand) GetAllOptionNames() (options []string) + type ToCOption struct + Default *string + Name string + Required bool + Shorthand *string + Type *string + Usage *string + type TopLevelCommand struct + MainCommand *Command + SubCommands Commands + func NewTopLevelCommand(c *cobra.Command) TopLevelCommand + type TopLevelCommands struct + Commands []TopLevelCommand + Group string + func NewTopLevelCommands(cs []*cobra.Command) TopLevelCommands + func (a TopLevelCommands) Len() int + func (a TopLevelCommands) Less(i, j int) bool + func (a TopLevelCommands) Swap(i, j int) v1.17.0-rc2 Dec 9, 2019 v1.17.0-rc1 Dec 2, 2019