Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( setts *Settings, rootArgs *Args, config any) (rootCmd *cobra.Command, preExecFunc func() error)
Create a new `quitsh` CLI with settings `setts` and root arguments `rootArgs`. The full argument structure `allArgs` is treated as `any` and will be used to parse the configuration files `--config` (`--config-user`) into before startup.
Types ¶
type Args ¶
type Args struct {
// The config YAML from which we read parameters for the CLI.
Config string `yaml:"-"`
// The config YAML (user overlay).
ConfigUser string `yaml:"-"`
// Working directory to switch to at startup.
// This will be used to search for components.
// This will be used to define the `RootDir` directory.
Cwd string `yaml:"cwd"`
// The root directory of quitsh.
// By default its the Git root directory resolved starting from
// `Cwd`.
RootDir string `yaml:"rootDir"`
// The log level `debug,info,warning,error`.
LogLevel string `yaml:"logLevel"`
// Enable environment print on command execution errors.
EnableEnvPrint bool `yaml:"enableEnvPrint"`
// Disable any toolchain dispatch which might happen.
SkipToolchainDispatch bool `yaml:"skipToolchainDispatch"`
// If we use a global output directory
// instead of component's specific one.
GlobalOutput bool `yaml:"globalOutput"`
// Use a specific output directory.
GlobalOutputDir string `yaml:"outputDir"`
}
Click to show internal directories.
Click to hide internal directories.