argp

package module
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 6 Imported by: 1

README

argp

Go Reference

Low-level arg-parsing bits.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PState

type PState struct {
	Args      []string
	Err       error
	Flag, Val string
}

func (*PState) Arg added in v0.4.0

func (p *PState) Arg() string

func (*PState) Error added in v0.9.0

func (p *PState) Error(err error) bool

func (*PState) Errorf

func (p *PState) Errorf(format string, a ...any) bool

func (*PState) MatchAnyFlag added in v0.6.0

func (p *PState) MatchAnyFlag() bool

func (*PState) MatchBoolFlag added in v0.5.0

func (p *PState) MatchBoolFlag(short, long string) bool

func (*PState) MatchFlagExpr added in v0.5.0

func (p *PState) MatchFlagExpr(short, long string) bool

func (*PState) MatchJustFlag added in v0.6.0

func (p *PState) MatchJustFlag(short, long string) bool

func (*PState) MatchJustSingleFlag added in v0.8.0

func (p *PState) MatchJustSingleFlag(flag string) bool

func (*PState) MatchLongFlagExpr added in v0.7.0

func (p *PState) MatchLongFlagExpr(long string) bool

func (*PState) Next added in v0.4.0

func (p *PState) Next()

func (*PState) ParseAnyTime added in v0.13.0

func (p *PState) ParseAnyTime(dest *time.Time, defaultToFuture bool) bool

func (*PState) ParseBool

func (p *PState) ParseBool(dest *bool) bool

func (*PState) ParseDate

func (p *PState) ParseDate(dest *time.Time) bool

func (*PState) ParseDuration

func (p *PState) ParseDuration(dest *time.Duration) bool

func (*PState) ParseFloat

func (p *PState) ParseFloat(dest *float64) bool

func (*PState) ParseInt

func (p *PState) ParseInt(dest *int) bool

func (*PState) ParseLocation added in v0.3.0

func (p *PState) ParseLocation(destLat, destLng *float64) bool

func (*PState) ParseLogLevel added in v0.7.0

func (p *PState) ParseLogLevel(dest *slog.Level) bool

func (*PState) ParseUint added in v0.10.0

func (p *PState) ParseUint(dest *uint) bool

Jump to

Keyboard shortcuts

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