Documentation
¶
Index ¶
- type Flag
- func NewBoolFlag(target *bool, name, helpMessage string) *Flag[bool]
- func NewDurationFlag(target *time.Duration, name, helpMessage string) *Flag[time.Duration]
- func NewFloatFlag(target *float64, bitSize int, name, helpMessage string) *Flag[float64]
- func NewIntFlag(target *int, name, helpMessage string) *Flag[int]
- func NewStringFlag(target *string, name, helpMessage string) *Flag[string]
- func NewURLFlag(target **url.URL, name, helpMessage string) *Flag[*url.URL]
- type Option
- type Parser
- func (p *Parser) Bool(target *bool, name, description string) *Flag[bool]
- func (p *Parser) Duration(target *time.Duration, name, description string) *Flag[time.Duration]
- func (p *Parser) Float(target *float64, bitSize int, name, description string) *Flag[float64]
- func (p *Parser) Int(target *int, name, description string) *Flag[int]
- func (p *Parser) Parse()
- func (p *Parser) String(target *string, name, description string) *Flag[string]
- func (p *Parser) URL(target **url.URL, name, description string) *Flag[*url.URL]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flag ¶
type Flag[T any] struct { // contains filtered or unexported fields }
func NewDurationFlag ¶
func NewFloatFlag ¶ added in v0.2.0
func NewURLFlag ¶ added in v0.2.0
func (*Flag[T]) Placeholder ¶
type Option ¶
type Option func(*Parser)
func WithAppName ¶
func WithAppVersion ¶
func WithAppVersionFlagName ¶
func WithEnvVarFormatter ¶
func WithEnvVarPrefix ¶
func WithHelpFlagName ¶
func WithoutAutoEnv ¶
func WithoutAutoEnv() Option
Click to show internal directories.
Click to hide internal directories.