cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommands

func AddCommands(commands ...*cobra.Command)

AddCommands adds all subcommands to root

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately.

Types

type CommandInfo

type CommandInfo struct {
	Name        string        `json:"name"`
	Use         string        `json:"use"`
	Short       string        `json:"short"`
	Long        string        `json:"long"`
	Subcommands []CommandInfo `json:"subcommands,omitempty"`
	Flags       []FlagInfo    `json:"flags,omitempty"`
	Examples    string        `json:"examples,omitempty"`
}

CommandInfo represents metadata about a command for introspection

type FlagInfo

type FlagInfo struct {
	Name      string `json:"name"`
	Shorthand string `json:"shorthand,omitempty"`
	Usage     string `json:"usage"`
	DefValue  string `json:"default,omitempty"`
	Required  bool   `json:"required"`
}

type GlobalFlags

type GlobalFlags struct {
	APIKey       string
	OutputFormat string
	OutputFile   string
	Verbose      bool
	Quiet        bool
	DryRun       bool
}

GlobalFlags holds all global flag values

func GetGlobalFlags

func GetGlobalFlags() GlobalFlags

GetGlobalFlags returns the current global flag values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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