cobra

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cobra contains embedded resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandData

type CommandData struct {
	// TODO: Eventually need to adjust the installation command based on multiple execution paths.
	// ExecutionRemotePath string `json:""`
	Name    string `json:""`
	Use     string `json:""`
	UseLine string `json:""`
	Long    string `json:""`
	Short   string `json:""`
	Example string `json:""`
	// HasExample determines if the command has example.
	HasExample bool `json:""`
	// Runnable determines if the command is itself runnable.
	Runnable bool `json:""`
	// HasSubCommands determines if the command has children commands.
	HasSubCommands bool           `json:""`
	SubCommands    []*CommandData `json:""`

	// IsAvailableCommand determines if a command is available as a non-help command
	// (this includes all non deprecated/hidden commands).
	IsAvailableCommand bool     `json:""`
	PersistentFlags    []string `json:""`
	LocalFlags         []string `json:""`
}

CommandData is the aggregated documentation data from a Cobra command. Must remain in the parse.go file to be transferred into the cobra directory. This file should only import from cobra and the standard library.

func Parse

func Parse(mod *utilities.ModuleInfo) ([]*CommandData, error)

Directories

Path Synopsis
test_data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL