xflag

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func

func Func[T any](name, usage string, fn func(string) (T, error)) *T

Func is like [flags.Func], but avoids the need for an init func by allocating its own storage for the return value.

func Lookup

func Lookup[T any](name string) T

Lookup looks up a flag by name of the given type.

Panics if this flag is of the wrong type, or if the flag value is not a flag.Getter.

func Parsed

func Parsed(name string) bool

Parsed returns whether the given flag was parsed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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