flags

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// None indicates no options.
	None Options = goflags.None

	// HelpFlag adds a default Help Options group to the parser containing
	// -h and --help options.
	HelpFlag = goflags.HelpFlag

	// PassDoubleDash passes all arguments after a double dash, --, as
	// remaining command line arguments.
	PassDoubleDash = goflags.PassDoubleDash

	// IgnoreUnknown ignores any unknown options and passes them as
	// remaining command line arguments instead of generating an error.
	IgnoreUnknown = goflags.IgnoreUnknown

	// PrintErrors prints any errors which occurred during parsing to
	// os.Stderr.
	PrintErrors = goflags.PrintErrors

	// PassAfterNonOption passes all arguments after the first non option
	// as remaining command line arguments.
	PassAfterNonOption = goflags.PassAfterNonOption

	// AllowBoolValues allows a user to assign true/false to a boolean value.
	AllowBoolValues = goflags.AllowBoolValues

	// Default is a convenient default set of options.
	Default = goflags.Default
)

Option constants re-exported from go-flags.

Variables

This section is empty.

Functions

func Parse

func Parse(opts any, options ...Options) error

func ParseArgs

func ParseArgs(opts any, args []string, options ...Options) error

ParseArgs parses the given args into opts.

Types

type Options

type Options = goflags.Options

Options represents parser options.

Jump to

Keyboard shortcuts

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