Documentation ¶
Index ¶
- type ArgList
- func (st *ArgList) Add(a *CommandLineArg) error
- func (st *ArgList) Current() (*CommandLineArg, bool)
- func (st *ArgList) Delete(name string) bool
- func (st *ArgList) DeleteAndPurge(name string) bool
- func (st *ArgList) Empty() bool
- func (st *ArgList) Exists(name string) bool
- func (st *ArgList) Get(name string) *CommandLineArg
- func (st *ArgList) Head() *CommandLineArg
- func (st *ArgList) IsChild(name string) bool
- func (st *ArgList) IsDeleted(name string) bool
- func (st *ArgList) IsParent(name string) bool
- func (st *ArgList) Len() int
- func (st *ArgList) Names() []string
- func (st *ArgList) Next() (*CommandLineArg, bool)
- func (st *ArgList) Previous() (*CommandLineArg, bool)
- func (st *ArgList) Print(name string)
- func (st *ArgList) PrintAll()
- func (st *ArgList) Purge(name string) bool
- func (st *ArgList) Reset()
- func (st *ArgList) ResetAll()
- func (st *ArgList) SetCurrent(name string) bool
- func (st *ArgList) SortedNames() []string
- func (st *ArgList) Tail() (*CommandLineArg, bool)
- func (st *ArgList) UnDelete(name string) bool
- func (st *ArgList) Update(a *CommandLineArg) error
- type CommandLineArg
- func (c CommandLineArg) Alias() string
- func (c CommandLineArg) Children() []string
- func (c CommandLineArg) DefaultValue() string
- func (c CommandLineArg) Deleted() bool
- func (c CommandLineArg) Errors() string
- func (c CommandLineArg) ID() int
- func (c CommandLineArg) IsDefault() bool
- func (c CommandLineArg) IsExclusive() bool
- func (c CommandLineArg) IsParamOpt() bool
- func (c CommandLineArg) IsRequired() bool
- func (c CommandLineArg) Kind() con.ArgType
- func (c CommandLineArg) LongHelp() string
- func (c CommandLineArg) Name() string
- func (c CommandLineArg) ParamCount() int
- func (c CommandLineArg) ParamType() boa.ParameterType
- func (c CommandLineArg) Parent() string
- func (c CommandLineArg) RunCode() string
- func (c CommandLineArg) ShortHelp() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgList ¶
type ArgList struct { // contains filtered or unexported fields } // look in storagemethods for impl
func NewArgList ¶
func NewArgList() *ArgList
NewArgList returns a pointer to ArgList. ex. MainList := clargs.NewArgList()
func (*ArgList) Add ¶
func (st *ArgList) Add(a *CommandLineArg) error
(*ArgList) Add(arg) appends an arg and makes it current. Cannot Add a name that is already in the list
func (*ArgList) Current ¶
func (st *ArgList) Current() (*CommandLineArg, bool)
(*ArgList) Current() returns the current arg
func (*ArgList) Delete ¶
(*ArgList) Delete(string) marks an arg as deleted and if it is current advances or retreats as needed. Returns success or failure.
func (*ArgList) DeleteAndPurge ¶
(*ArgList) DeleteAndPurge(string) calls Delete followed by Purge
func (*ArgList) Get ¶
func (st *ArgList) Get(name string) *CommandLineArg
(*ArgList) Get(string) performs a lookup by arg.Name and returns it if found
func (*ArgList) Head ¶
func (st *ArgList) Head() *CommandLineArg
(*ArgList) Head() returns the list Head
func (*ArgList) IsDeleted ¶
(*ArgList) IsDeleted(string) returns the deletion status of the named arg
func (*ArgList) Next ¶
func (st *ArgList) Next() (*CommandLineArg, bool)
(*ArgList) Next() returns the next arg and advances current. if current has children the head of that list will be next.
func (*ArgList) Previous ¶
func (st *ArgList) Previous() (*CommandLineArg, bool)
(*ArgList) Previous() returns the previous arg and makes it current
func (*ArgList) Purge ¶
(*ArgList) Purge(string) removes a deleted arg from the linked list if found this can be dangerous as its children are purged as well
func (*ArgList) ResetAll ¶
func (st *ArgList) ResetAll()
(*ArgList) ResetAll() rids the list of all data
func (*ArgList) SetCurrent ¶
(*ArgList) SetCurrent(string) takes a name and if found makes it the current arg
func (*ArgList) SortedNames ¶
(*ArgList) SortedNames() returns a slice of names sorted a-z
func (*ArgList) Tail ¶
func (st *ArgList) Tail() (*CommandLineArg, bool)
(*ArgList) Tail() returns the list Tail
func (*ArgList) UnDelete ¶
(*ArgList) UnDelete(string) unmarks an arg as deleted and makes it current
func (*ArgList) Update ¶
func (st *ArgList) Update(a *CommandLineArg) error
(*ArgList) Update(arg) tries to Add(arg) and if it already exists will replace the existing one with the passed arg
type CommandLineArg ¶
type CommandLineArg struct { Arg *boa.CmdLineItem // contains filtered or unexported fields } // look in itemmethods.go for impl
func NewCommandLineArg ¶
func NewCommandLineArg(arg *boa.CmdLineItem) *CommandLineArg
NewCommandLineArg constructs and returns a *CommandLineArg
func (CommandLineArg) Alias ¶
func (c CommandLineArg) Alias() string
func (CommandLineArg) Children ¶
func (c CommandLineArg) Children() []string
func (CommandLineArg) DefaultValue ¶
func (c CommandLineArg) DefaultValue() string
func (CommandLineArg) Deleted ¶
func (c CommandLineArg) Deleted() bool
func (CommandLineArg) Errors ¶
func (c CommandLineArg) Errors() string
func (CommandLineArg) ID ¶
func (c CommandLineArg) ID() int
func (CommandLineArg) IsDefault ¶
func (c CommandLineArg) IsDefault() bool
func (CommandLineArg) IsExclusive ¶
func (c CommandLineArg) IsExclusive() bool
func (CommandLineArg) IsParamOpt ¶
func (c CommandLineArg) IsParamOpt() bool
func (CommandLineArg) IsRequired ¶
func (c CommandLineArg) IsRequired() bool
func (CommandLineArg) Kind ¶
func (c CommandLineArg) Kind() con.ArgType
func (CommandLineArg) LongHelp ¶
func (c CommandLineArg) LongHelp() string
func (CommandLineArg) Name ¶
func (c CommandLineArg) Name() string
func (CommandLineArg) ParamCount ¶
func (c CommandLineArg) ParamCount() int
func (CommandLineArg) ParamType ¶
func (c CommandLineArg) ParamType() boa.ParameterType
func (CommandLineArg) Parent ¶
func (c CommandLineArg) Parent() string
func (CommandLineArg) RunCode ¶
func (c CommandLineArg) RunCode() string
func (CommandLineArg) ShortHelp ¶
func (c CommandLineArg) ShortHelp() string