Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJsonDocs ¶
NewDocs generates the CLI documentation in markdown
func WebLogger ¶
func WebLogger(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
Types ¶
type ApplicationDetails ¶
type ApplicationDetails struct { AssemblyName string Commands []CommandDetail }
type CommandDetail ¶
type CommandDetail struct { Name string `json:"name"` ShortDescription string `json:"short"` LongDescription string `json:"long"` Examples string `json:"examples"` Options OptionDescriptions `json:"options"` }
CommandDetail structure contains parent level commands meta data
func GetCommandDetails ¶
func GetCommandDetails(cmd *cobra.Command) ([]CommandDetail, error)
ConvertToJSON converts all the commandline options of the given command to JSON.
type OptionDescription ¶
type OptionDescription struct { Name string `json:"name"` Default interface{} `json:"default"` Description string `json:"description"` Hidden bool `json:"hidden"` Section string `json:"section"` Type string `json:"type"` Values string `json:"values,omitempty"` }
OptionDescription contains a properties that describe a commandline option.
type OptionDescriptions ¶
type OptionDescriptions []OptionDescription
OptionDescriptions contains the descriptions for all commandline options of a command.
Click to show internal directories.
Click to hide internal directories.