args

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Done = errors.New("version")

Functions

func ParseArgs

func ParseArgs(dir string, osArgs []string, info version.Info, variables interface{}) error

Types

type ConfigFlag added in v0.1.1

type ConfigFlag string

func (ConfigFlag) BeforeApply added in v0.1.1

func (v ConfigFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error

func (ConfigFlag) Decode added in v0.1.1

func (v ConfigFlag) Decode(ctx *kong.DecodeContext) error

func (ConfigFlag) IsBool added in v0.1.1

func (v ConfigFlag) IsBool() bool

type Globals

type Globals struct {
	Version VersionFlag `name:"version" help:"Print args information and exit"`
	Verbose VerboseFlag `short:"v" help:"Enable verbose mode"`
	Config  ConfigFlag  `help:"Print parsed config and exit"`
}

type VerboseFlag added in v0.1.2

type VerboseFlag string

func (VerboseFlag) BeforeApply added in v0.1.2

func (v VerboseFlag) BeforeApply(*kong.Kong, kong.Vars) error

func (VerboseFlag) Decode added in v0.1.2

func (v VerboseFlag) Decode(ctx *kong.DecodeContext) error

func (VerboseFlag) IsBool added in v0.1.2

func (v VerboseFlag) IsBool() bool

type VersionFlag

type VersionFlag string

func (VersionFlag) BeforeApply

func (v VersionFlag) BeforeApply(app *kong.Kong, vars kong.Vars) error

func (VersionFlag) Decode

func (v VersionFlag) Decode(ctx *kong.DecodeContext) error

func (VersionFlag) IsBool

func (v VersionFlag) IsBool() bool

Jump to

Keyboard shortcuts

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