Versions in this module Expand all Collapse all v2 v2.2.0 Mar 7, 2026 Changes in this version + var ErrHelpRequested = helpRequestedError + func NewLogger(level slog.Level, w io.Writer) *slog.Logger + func NewLoggerWithFormat(level slog.Level, w io.Writer, format Format) *slog.Logger + func ParseLogLevel(level string) slog.Level + func Run(ctx context.Context, args []string) error + type DefaultParser struct + func (p *DefaultParser) Help() string + func (p *DefaultParser) Parse(ctx context.Context, args []string) (*ParseResult, error) + type Format int + const FormatAuto + const FormatConsole + const FormatJSON + type Option struct + Aliases []string + DefaultValue string + IsBoolean bool + IsSlice bool + Name string + Usage string + type OptionValue interface + IsSet func() bool + String func() string + StringSlice func() []string + type ParseResult struct + Args []string + Options map[string]OptionValue + type Parser interface + Help func() string + Parse func(ctx context.Context, args []string) (*ParseResult, error) + func NewParser(opts []Option) (Parser, error) + type StringSliceValue struct + func (s *StringSliceValue) IsSet() bool + func (s *StringSliceValue) String() string + func (s *StringSliceValue) StringSlice() []string + type StringValue struct + func (s *StringValue) IsSet() bool + func (s *StringValue) String() string + func (s *StringValue) StringSlice() []string