argument

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Array

func Array(a *Argument)

func Default

func Default(v interface{}) func(*Argument)

func Flag

func Flag(flag flag.Flag) func(*Argument)

func Required

func Required(a *Argument)

Types

type Argument

type Argument struct {
	Name        string
	Description string
	Default     value.Value
	Flag        flag.Flag
	Valid       []func(value.Value) error
}

func New

func New(name, description string, opts ...func(*Argument)) Argument

func (Argument) HasDefault

func (a Argument) HasDefault() bool

func (Argument) IsArray

func (a Argument) IsArray() bool

func (Argument) IsBool

func (a Argument) IsBool() bool

func (Argument) IsRequired

func (a Argument) IsRequired() bool

func (Argument) Validate

func (a Argument) Validate(v value.Value) error

Jump to

Keyboard shortcuts

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