flagext

package
v0.0.0-...-987fb27 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultValues

func DefaultValues(rs ...Parser)

DefaultValues initiates a set of configs (Parsers) with their defaults.

func IgnoredFlag

func IgnoredFlag(f *flag.FlagSet, name, message string)

IgnoredFlag ignores set value, without any warning

func ParseFlags

func ParseFlags(rs ...Parser)

ParseFlags parse flags with the provided Parsers

func ParseFlagsWithPrefix

func ParseFlagsWithPrefix(prefix string, rs ...Parser)

ParseFlagsWithPrefix registers flags with the provided Parsers with prefix

Types

type Parser

type Parser interface {
	ParseFlags(*flag.FlagSet)
	ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)
}

Parser is a thing that can ParseFlags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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