Documentation ¶
Overview ¶
Package babycli is a library for declrative parsing of command line arguments, including support for sub-commands, command aliases, long and short flag names, repeated flags, and custom help messages.
Index ¶
- func Arguments() []string
- type Code
- type Component
- func (c *Component) Arguments() []string
- func (c *Component) Context() context.Context
- func (c *Component) GetBool(flag string) bool
- func (c *Component) GetBools(flag string) []bool
- func (c *Component) GetDuration(flag string) time.Duration
- func (c *Component) GetDurations(flag string) []time.Duration
- func (c *Component) GetInt(flag string) int
- func (c *Component) GetInts(flag string) []int
- func (c *Component) GetString(flag string) string
- func (c *Component) GetStrings(flag string) []string
- func (c *Component) HasBool(flag string) bool
- func (c *Component) HasDuration(flag string) bool
- func (c *Component) HasInt(flag string) bool
- func (c *Component) HasString(flag string) bool
- func (c *Component) Leaf() bool
- func (c *Component) Nargs() int
- type Components
- type Configuration
- type Default
- type Flag
- type FlagType
- type Flags
- type Func
- type Runnable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct { Name string Help string Description string Components Components Function Func Flags Flags // contains filtered or unexported fields }
func (*Component) GetStrings ¶
func (*Component) HasDuration ¶
type Components ¶
type Components []*Component
func (Components) Contains ¶
func (cs Components) Contains(name string) bool
func (Components) Get ¶
func (cs Components) Get(name string) *Component
type Configuration ¶
type Flag ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.