goflags

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: BSD-3-Clause

README

goflags

http://godoc.org?q=github.com/creachadair/goflags

The packages in this repository define extensions to the standard Go "flag" package for additional types beyond the standard set, by providing implementations of the flag.Value and flag.Getter interfaces.

Subpackages

sizeflag

Defines a flag that accepts human-readable integer values, with shorthand for multiples of powers of 1024. For example, "1K" for 1024, "2.1m" for 2202009, and so forth.

enumflag

Defines a flag that accepts a single string value taken from a fixed set of values chosen when the flag is defined. Values are compared without regard to case.

regexpflag

Defines a flag that accepts a valid *regexp.Regexp value compiled from a string literal.

timeflag

Defines a flag that accepts a time.Time value parsed via a standard format string.

Directories

Path Synopsis
Package enumflag defines a flag.Value implementation that accepts one of a specified collection of string keys.
Package enumflag defines a flag.Value implementation that accepts one of a specified collection of string keys.
Package regexpflag implements a convenience wrapper for defining flags that contain *regexp.Regexp values.
Package regexpflag implements a convenience wrapper for defining flags that contain *regexp.Regexp values.
Package sizeflag provides flag.Value implementations that support a convenient human-readable notation for integer sizes.
Package sizeflag provides flag.Value implementations that support a convenient human-readable notation for integer sizes.
Package timeflag defines a flag.Value implementation that parses time.Time values through a format string.
Package timeflag defines a flag.Value implementation that parses time.Time values through a format string.

Jump to

Keyboard shortcuts

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