Implement unit property for flags
This commit is contained in:
parent
c3742ade4e
commit
61fccca070
7 changed files with 17 additions and 7 deletions
|
|
@ -34,6 +34,7 @@ type myTeamFlag struct {
|
|||
Type string `json:"type,omitempty"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
Help string `json:"help,omitempty"`
|
||||
Unit string `json:"unit,omitempty"`
|
||||
Separator string `json:"separator,omitempty"`
|
||||
NbLines uint64 `json:"nb_lines,omitempty"`
|
||||
IgnoreOrder bool `json:"ignore_order,omitempty"`
|
||||
|
|
@ -205,6 +206,7 @@ func MyJSONTeam(t *Team, started bool) (interface{}, error) {
|
|||
Type: k.Type,
|
||||
order: k.Order,
|
||||
Help: k.Help,
|
||||
Unit: k.Unit,
|
||||
}
|
||||
|
||||
if strings.HasPrefix(flag.Type, "number") {
|
||||
|
|
|
|||
Reference in a new issue