command

package
v0.0.0-...-b235061 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

file: pkg/command/root.go

file: pkg/command/set.go

Index

Constants

This section is empty.

Variables

Functions

func ProviderCommander

func ProviderCommander() interfaces.Commander

Types

type Commander

type Commander struct {
	// contains filtered or unexported fields
}

func NewCommander

func NewCommander() *Commander

func (*Commander) AddCommand

func (c *Commander) AddCommand(cmd interfaces.Command)

func (*Commander) ExecuteContext

func (c *Commander) ExecuteContext(ctx context.Context) error

type Serve

type Serve struct {
	// contains filtered or unexported fields
}

func NewServe

func NewServe() *Serve

func (*Serve) Execute

func (s *Serve) Execute() error

func (*Serve) Flags

func (s *Serve) Flags() *pflag.FlagSet

func (*Serve) GetCobraCmd

func (s *Serve) GetCobraCmd() *cobra.Command

func (*Serve) PersistentFlags

func (s *Serve) PersistentFlags() *pflag.FlagSet

func (*Serve) PersistentPreRun

func (s *Serve) PersistentPreRun(hook func(*cobra.Command, []string)) interfaces.Serve

func (*Serve) PersistentPreRunE

func (s *Serve) PersistentPreRunE(hook func(*cobra.Command, []string) error) interfaces.Serve

func (*Serve) Run

func (s *Serve) Run(cmd *cobra.Command, args []string)

func (*Serve) RunE

func (s *Serve) RunE(cmd *cobra.Command, args []string) error

func (*Serve) WithExample

func (s *Serve) WithExample(example string) interfaces.Serve

func (*Serve) WithLong

func (s *Serve) WithLong(description string) interfaces.Serve

func (*Serve) WithPostRunHook

func (s *Serve) WithPostRunHook(hook func()) interfaces.Serve

func (*Serve) WithRun

func (s *Serve) WithRun(run func(cmd *cobra.Command, args []string)) interfaces.Serve

func (*Serve) WithRunE

func (s *Serve) WithRunE(run func(cmd *cobra.Command, args []string) error) interfaces.Serve

func (*Serve) WithShort

func (s *Serve) WithShort(description string) interfaces.Serve

Jump to

Keyboard shortcuts

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