Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Goos = runtime.GOOS
Goos returns the operating system, can be mocked for testing
Functions ¶
func Execute ¶
func Execute() error
Execute is the main entry point for the Windsor CLI application. It executes the root command with the provided context or a new background context. Sets the root command's context before execution so cmd.Root().Context() is correct when RunE runs (Cobra does not always propagate context to root on subsequent runs).
func RootCmd ¶ added in v0.9.0
RootCmd exposes the assembled cobra command tree for tooling that needs to introspect commands without executing them — currently the reference-doc generator under internal/gendocs. Importing the cmd package triggers the init() blocks that register every subcommand, so this accessor reflects the full tree by the time any caller invokes it.
Types ¶
type Shims ¶ added in v0.5.7
type Shims struct {
Exit func(int)
UserHomeDir func() (string, error)
Stat func(string) (os.FileInfo, error)
RemoveAll func(string) error
Getwd func() (string, error)
Setenv func(string, string) error
Command func(string, ...string) *exec.Cmd
Getenv func(string) string
ReadFile func(string) ([]byte, error)
}
Shims provides mockable wrappers around system and runtime functions