Documentation ¶
Index ¶
- type Args
- func (ar *Args) AddBool(name string, def bool, desc string)
- func (ar *Args) AddFloat(name string, def float64, desc string)
- func (ar *Args) AddInt(name string, def int, desc string)
- func (ar *Args) AddStd()
- func (ar *Args) AddString(name string, def string, desc string)
- func (ar *Args) Bool(name string) bool
- func (ar *Args) Flag()
- func (ar *Args) Float(name string) float64
- func (ar *Args) Init()
- func (ar *Args) Int(name string) int
- func (ar *Args) Parse()
- func (ar *Args) ProcStd()
- func (ar *Args) SetBool(name string, val bool)
- func (ar *Args) SetFloat(name string, val float64)
- func (ar *Args) SetInt(name string, val int)
- func (ar *Args) SetString(name string, val string)
- func (ar *Args) String(name string) string
- func (ar *Args) Usage()
- type Bool
- type Float
- type Int
- type String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { Ints map[string]*Int Bools map[string]*Bool Strings map[string]*String Floats map[string]*Float Flagged bool `inactive:"+" desc:"true when all args have been set to flag package"` }
Args provides maps for storing commandline args.
func (*Args) AddStd ¶
func (ar *Args) AddStd()
AddStd adds the standard command line args used by most sims
func (*Args) Flag ¶
func (ar *Args) Flag()
Flag sets all args to the system flag values, only if not already done.
func (*Args) Parse ¶
func (ar *Args) Parse()
Parse parses command line args, setting values from command line Any errors will cause the program to exit with error message.
func (*Args) ProcStd ¶
func (ar *Args) ProcStd()
ProcStd processes the standard args, after Parse has been called
type Bool ¶
type Bool struct { Name string `desc:"name of arg -- must be unique"` Desc string `desc:"description of arg"` Val bool `desc:"value as parsed"` Def bool `desc:"default initial value"` }
Bool represents a bool valued arg
type Float ¶
type Float struct { Name string `desc:"name of arg -- must be unique"` Desc string `desc:"description of arg"` Val float64 `desc:"value as parsed"` Def float64 `desc:"default initial value"` }
Float represents a float64 valued arg
type Int ¶
type Int struct { Name string `desc:"name of arg -- must be unique"` Desc string `desc:"description of arg"` Val int `desc:"value as parsed"` Def int `desc:"default initial value"` }
Int represents a int valued arg
Click to show internal directories.
Click to hide internal directories.