Implement unit property for flags

This commit is contained in:
nemunaire 2021-11-12 23:52:22 +01:00
commit 61fccca070
7 changed files with 17 additions and 7 deletions

View file

@ -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") {