shellspec

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandInfo

func GetCommandInfo(cmd *cobra.Command) map[string]CommandInfo

Types

type CommandEntry

type CommandEntry struct {
	Command string
	Info    CommandInfo
}

A struct to hold key-value pairs for the template

type CommandInfo

type CommandInfo struct {
	CobraCmd *cobra.Command      `json:"-"`
	Command  string              `json:"Command"`
	Flags    map[string]FlagInfo `json:"Flags"`
}

func (CommandInfo) GenerateHelpFixtures

func (c CommandInfo) GenerateHelpFixtures() error

func (CommandInfo) GenerateSpecfile

func (c CommandInfo) GenerateSpecfile() error

type FlagInfo

type FlagInfo struct {
	Name              string      `json:"name"`
	DataType          string      `json:"data_type"`
	Required          bool        `json:"required"`
	Persistent        bool        `json:"persistent"`
	MutuallyExclusive interface{} `json:"mutually_exclusive"`
	MutuallyRequired  interface{} `json:"mutually_required"`
}

Jump to

Keyboard shortcuts

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