chinampa/pkg/command/root.go

51 lines
1.3 KiB
Go
Raw Normal View History

2022-12-19 03:04:34 +00:00
// Copyright © 2022 Roberto Hidalgo <chinampa@un.rob.mx>
2022-12-31 05:53:24 +00:00
// SPDX-License-Identifier: Apache-2.0
2022-12-19 03:04:34 +00:00
package command
import (
_c "git.rob.mx/nidito/chinampa/internal/constants"
"git.rob.mx/nidito/chinampa/pkg/runtime"
)
var Root = &Command{
2022-12-29 19:05:58 +00:00
Summary: "Replace me with chinampa.Configure",
Description: "",
Path: []string{runtime.Executable},
2022-12-19 03:04:34 +00:00
Options: Options{
_c.HelpCommandName: &Option{
ShortName: "h",
Type: "bool",
Description: "Display help for any command",
},
2023-03-24 06:44:47 +00:00
"color": &Option{
2022-12-19 03:04:34 +00:00
Type: "bool",
2023-03-24 06:44:47 +00:00
Description: "Always print colors to stderr",
Default: runtime.ColorEnabled(),
2022-12-19 03:04:34 +00:00
},
"no-color": &Option{
Type: "bool",
Description: "Disable printing of colors to stderr",
Default: !runtime.ColorEnabled(),
},
2023-03-24 06:44:47 +00:00
"verbose": &Option{
ShortName: "v",
2022-12-19 03:04:34 +00:00
Type: "bool",
2023-03-24 06:44:47 +00:00
Default: runtime.VerboseEnabled(),
Description: "Log verbose output to stderr",
2022-12-19 03:04:34 +00:00
},
"silent": &Option{
Type: "bool",
Description: "Silence non-error logging",
},
"skip-validation": &Option{
Type: "bool",
Description: "Do not validate any arguments or options",
},
2023-03-24 06:44:47 +00:00
"version": &Option{
Type: "bool",
Default: false,
Description: "Display program version and exit",
},
2022-12-19 03:04:34 +00:00
},
}