debug
parent
853960e754
commit
2bf49d7b3c
12
argset.go
12
argset.go
|
|
@ -26,6 +26,18 @@ func NewArgSet(configFiles ...string) *ArgSet {
|
|||
}
|
||||
}
|
||||
|
||||
func (as *ArgSet) String() string {
|
||||
s := "{"
|
||||
for _, arg := range as.args {
|
||||
if len(s) > 2 {
|
||||
s += ", "
|
||||
}
|
||||
s += fmt.Sprintf("%s:%v", arg.Flag, arg.Value)
|
||||
}
|
||||
s += "}"
|
||||
return s
|
||||
}
|
||||
|
||||
func (as *ArgSet) Append(argType Type, key, help string, def interface{}) {
|
||||
as.args = append(as.args, NewArg(argType, key, help, def))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue