cmd

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 156 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type CommandDetail

type CommandDetail struct {
	Name        string          `json:"name"`
	Use         string          `json:"use"`
	Short       string          `json:"short"`
	Long        string          `json:"long,omitempty"`
	Flags       []FlagDetail    `json:"flags,omitempty"`
	Subcommands []CommandDetail `json:"commands,omitempty"`
}

CommandDetail represents a command's full information

type FlagDetail

type FlagDetail struct {
	Name        string `json:"name"`
	Shorthand   string `json:"shorthand,omitempty"`
	Type        string `json:"type"`
	Default     string `json:"default"`
	Description string `json:"description"`
}

FlagDetail represents a single flag's information

type GoProcessInfo added in v1.2.0

type GoProcessInfo struct {
	PID       int    `json:"pid"`
	PPID      int    `json:"ppid"`
	Command   string `json:"command"`
	Version   string `json:"version"`
	BuildPath string `json:"build_path"`
}

GoProcessInfo represents Go process information for JSON output

Jump to

Keyboard shortcuts

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