flags

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Nice

func Nice(key, value string) string

Nice formats flag nicely

Types

type Flags

type Flags struct {
	Name string
	// contains filtered or unexported fields
}

func Merge

func Merge(f ...*Flags) *Flags

Merge merges one or more Flags Later flags don't overwrite previous ones.

func New

func New(name string) *Flags

func (*Flags) Bool

func (d *Flags) Bool(names []string, value bool, usage string) *Flags

func (*Flags) Exists

func (d *Flags) Exists(name string) bool

func (*Flags) FlagCount

func (d *Flags) FlagCount() int

FlagCount returns the number of flags that have been defined.

func (*Flags) Int64

func (d *Flags) Int64(names []string, value int64, usage string) *Flags

func (*Flags) Keys

func (d *Flags) Keys() ([]string, error)

Keys returns all flag names Don't rely on it's order!

func (*Flags) Parse

func (d *Flags) Parse(args *[]string) (*data.Data, error)

Parse parses the flags and returns the data

func (*Flags) PrintUsage

func (d *Flags) PrintUsage()

func (*Flags) String

func (d *Flags) String(names []string, value string, usage string) *Flags

func (*Flags) Var

func (d *Flags) Var(names []string, usage string) *Flags

Jump to

Keyboard shortcuts

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