cobrax

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	*cobra.Command
}

func NewCommand

func NewCommand(use string, opts ...Option) *Command

func (*Command) AddCommand

func (c *Command) AddCommand(cmds ...*Command)

func (*Command) Flags

func (c *Command) Flags() *FlagSet

func (*Command) MustInit

func (c *Command) MustInit()

func (*Command) PersistentFlags

func (c *Command) PersistentFlags() *FlagSet

type FlagSet

type FlagSet struct {
	*pflag.FlagSet
}

func (*FlagSet) BoolVar

func (f *FlagSet) BoolVar(p *bool, name string)

func (*FlagSet) BoolVarP

func (f *FlagSet) BoolVarP(p *bool, name, shorthand string)

func (*FlagSet) BoolVarPWithDefaultValue

func (f *FlagSet) BoolVarPWithDefaultValue(p *bool, name, shorthand string, value bool)

func (*FlagSet) BoolVarWithDefaultValue

func (f *FlagSet) BoolVarWithDefaultValue(p *bool, name string, value bool)

func (*FlagSet) IntVar

func (f *FlagSet) IntVar(p *int, name string)

func (*FlagSet) IntVarWithDefaultValue

func (f *FlagSet) IntVarWithDefaultValue(p *int, name string, value int)

func (*FlagSet) StringSliceVar

func (f *FlagSet) StringSliceVar(p *[]string, name string)

func (*FlagSet) StringSliceVarP

func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string)

func (*FlagSet) StringSliceVarPWithDefaultValue

func (f *FlagSet) StringSliceVarPWithDefaultValue(p *[]string, name, shorthand string, value []string)

func (*FlagSet) StringSliceVarWithDefaultValue

func (f *FlagSet) StringSliceVarWithDefaultValue(p *[]string, name string, value []string)

func (*FlagSet) StringVar

func (f *FlagSet) StringVar(p *string, name string)

func (*FlagSet) StringVarP

func (f *FlagSet) StringVarP(p *string, name, shorthand string)

func (*FlagSet) StringVarPWithDefaultValue

func (f *FlagSet) StringVarPWithDefaultValue(p *string, name, shorthand string, value string)

func (*FlagSet) StringVarWithDefaultValue

func (f *FlagSet) StringVarWithDefaultValue(p *string, name string, value string)

type Option

type Option func(*cobra.Command)

func WithArgs

func WithArgs(arg cobra.PositionalArgs) Option

func WithHidden

func WithHidden() Option

func WithRun

func WithRun(run func(*cobra.Command, []string)) Option

func WithRunE

func WithRunE(runE func(*cobra.Command, []string) error) Option

Jump to

Keyboard shortcuts

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