add flag tags to Config flags

This commit is contained in:
2026-03-27 13:34:57 +00:00
parent 6ec3c55383
commit 68b8ab2018
2 changed files with 8 additions and 8 deletions

View File

@@ -40,10 +40,10 @@ type context struct {
} }
type Config struct { type Config struct {
Host string `default:"mixer.local" help:"The host of the X32 device." env:"X32_CLI_HOST" short:"H"` Host string `flag:"" default:"mixer.local" help:"The host of the X32 device." env:"X32_CLI_HOST" short:"H"`
Port int `default:"10023" help:"The port of the X32 device." env:"X32_CLI_PORT" short:"P"` Port int `flag:"" default:"10023" help:"The port of the X32 device." env:"X32_CLI_PORT" short:"P"`
Timeout time.Duration `default:"100ms" help:"Timeout for OSC operations." env:"X32_CLI_TIMEOUT" short:"T"` Timeout time.Duration `flag:"" default:"100ms" help:"Timeout for OSC operations." env:"X32_CLI_TIMEOUT" short:"T"`
Loglevel string `default:"warn" help:"Log level for the CLI." env:"X32_CLI_LOGLEVEL" short:"L" enum:"debug,info,warn,error,fatal"` Loglevel string `flag:"" default:"warn" help:"Log level for the CLI." env:"X32_CLI_LOGLEVEL" short:"L" enum:"debug,info,warn,error,fatal"`
} }
// CLI is the main struct for the command-line interface. // CLI is the main struct for the command-line interface.

View File

@@ -40,10 +40,10 @@ type context struct {
} }
type Config struct { type Config struct {
Host string `default:"mixer.local" help:"The host of the X-Air device." env:"XAIR_CLI_HOST" short:"H"` Host string `flag:"" default:"mixer.local" help:"The host of the X-Air device." env:"XAIR_CLI_HOST" short:"H"`
Port int `default:"10024" help:"The port of the X-Air device." env:"XAIR_CLI_PORT" short:"P"` Port int `flag:"" default:"10024" help:"The port of the X-Air device." env:"XAIR_CLI_PORT" short:"P"`
Timeout time.Duration `default:"100ms" help:"Timeout for OSC operations." env:"XAIR_CLI_TIMEOUT" short:"T"` Timeout time.Duration `flag:"" default:"100ms" help:"Timeout for OSC operations." env:"XAIR_CLI_TIMEOUT" short:"T"`
Loglevel string `default:"warn" help:"Log level for the CLI." env:"XAIR_CLI_LOGLEVEL" short:"L" enum:"debug,info,warn,error,fatal"` Loglevel string `flag:"" default:"warn" help:"Log level for the CLI." env:"XAIR_CLI_LOGLEVEL" short:"L" enum:"debug,info,warn,error,fatal"`
} }
// CLI is the main struct for the command-line interface. // CLI is the main struct for the command-line interface.