test

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyMain

type MyMain struct {
	Thing string `flag:"thing" help:"does a thing"`

	Bing string `flag:"-" help:"shouldn't happen"`

	Abool     bool          `flag:"a-bool" help:"boolean flag" short:"b"`
	Aint      int           `flag:"a-int" help:"int flag"`
	Aint64    int64         `flag:"a-int64" help:"int64 flag"`
	Afloat    float64       `flag:"a-float" help:"float flag"`
	Auint     uint          `flag:"a-uint" help:"uint flag"`
	Auint64   uint64        `flag:"a-uint64" help:"uint64 flag"`
	Aduration time.Duration `flag:"a-duration" help:"duration flag"`

	AStringSlice []string `help:"string slice flag"`

	SubThing SubThing `flag:"subthing"`
	// contains filtered or unexported fields
}

MyMain defines a variety of different field types and exercises various different tags.

func (*MyMain) Run

func (m *MyMain) Run() error

Run implements the Runner interface.

type SubThing

type SubThing struct {
	SubBool bool `flag:"a-bool" help:"nested boolean flag"`
}

SubThing exists to test nested structs.

Jump to

Keyboard shortcuts

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