cli

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 10 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
	Example          string
	NoRequireConfig  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