Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteContext ¶ added in v1.3.0
ExecuteContext runs the root command with ctx wired through to every subcommand's RunE via cmd.Context(). main.go installs a signal-cancelled context here so Ctrl+C reaches into long-running analyze paths (image pulls, exports) instead of waiting for them to return.
func SetVersionInfo ¶
func SetVersionInfo(v, c, d string)
func StarterConfig ¶ added in v1.3.0
StarterConfig returns the embedded starter config bytes for the named flavour. The boolean is false if the flavour isn't one of the supported values. Callers should validate flavour before calling, but the boolean keeps a typo from causing a nil-byte write to .layerx.yaml.
Types ¶
type ErrCIFailed ¶ added in v1.2.2
type ErrCIFailed struct{}
ErrCIFailed signals that one or more CI rules did not pass. main.go maps this sentinel to exit code 1; any other non-nil error returned from cobra exits 2. The report has already been printed to stdout by the time this is returned, so the caller should not print the error message itself.
func (*ErrCIFailed) Error ¶ added in v1.2.2
func (e *ErrCIFailed) Error() string
type ErrCompareRegression ¶ added in v1.3.0
type ErrCompareRegression struct{}
ErrCompareRegression signals that `layerx compare` detected a regression (efficiency dropped or wasted bytes increased). main.go maps this sentinel to exit code 1; operational errors (resolver failure, daemon down) flow through the normal cobra path and exit 2.
func (*ErrCompareRegression) Error ¶ added in v1.3.0
func (e *ErrCompareRegression) Error() string
type ErrCompareUsage ¶ added in v1.3.0
type ErrCompareUsage struct{}
ErrCompareUsage is returned when the user invoked `layerx compare` with the wrong number of arguments. The wrapper prints a short hint to stderr; the sentinel itself carries no message body so cobra doesn't double-print.
func (*ErrCompareUsage) Error ¶ added in v1.3.0
func (e *ErrCompareUsage) Error() string