flag

package
v0.0.0-...-4f6d325 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrDefaultValueType

func ErrDefaultValueType(s string, t interface{}) error

Types

type Bool

type Bool struct {
	*Opts
	Value bool
}

func (*Bool) Set

func (b *Bool) Set()

type Opts

type Opts struct {
	FlagSet *flag.FlagSet
	Name    string
	Default interface{}
	Help    string
}

func NewOpts

func NewOpts(name string, dfl interface{}, help string, sets ...*flag.FlagSet) *Opts

type String

type String struct {
	*Opts
	Value string
}

func (*String) Set

func (s *String) Set()

Jump to

Keyboard shortcuts

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