cli

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSubcommand

func AddSubcommand(s *Subcommand)

func Run

func Run()

Types

type Subcommand

type Subcommand struct {
	Use     string
	Short   string
	Long    string
	Example string

	NoRequireConfig bool
	ConfigWithKeys  bool

	Run func(ctx context.Context, subcommand *Subcommand,
		args []string) error
	SetupFlags       func(f *pflag.FlagSet)
	SetupSubcommands func() []*Subcommand
	SetupCobra       func(c *cobra.Command)
	// contains filtered or unexported fields
}

func (*Subcommand) Config

func (s *Subcommand) Config() *config.Config

func (*Subcommand) ConfigParsingError

func (s *Subcommand) ConfigParsingError() error

Jump to

Keyboard shortcuts

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