Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 84 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command. All exit paths call os.Exit explicitly.

func LegacySyncOverlapsMirror added in v0.4.1

func LegacySyncOverlapsMirror(targetProvider string, appCfg *config.Config) bool

LegacySyncOverlapsMirror returns true if a legacy sync target's provider is also declared as a mirror, meaning the mirror should take precedence. Exported for use in release_create.go where legacy sync targets are executed.

func RunConfigBadges

func RunConfigBadges(appCfg *config.Config, rootDir string, names []string, status string) error

RunConfigBadges generates SVG badges from scribe config items. Called by `stagefreight scribe apply` and the CI narrate stage.

func RunDocsGenerate

func RunDocsGenerate(rootCommand *cobra.Command, outputDir string) error

RunDocsGenerate generates reference documentation from the Cobra command tree. Extracted for reuse by both Cobra command and CI runners. Requires rootCmd for CLI reference generation — pass it explicitly.

func RunReleaseCreate added in v0.4.0

func RunReleaseCreate(req ReleaseCreateRequest) error

RunReleaseCreate executes the full release creation pipeline from an explicit request. All inputs are taken from req — no package-level vars are referenced.

func RunScribe added in v0.8.0

func RunScribe(appCfg *config.Config, rootDir string, dryRun bool, isVerbose bool) error

RunScribe runs the scribe engine and renders its results. Extracted for reuse by both the Cobra command and CI runners. The engine (src/scribe) owns the domain work and returns data; this function is the sole renderer of that data.

func RunSecurityScan added in v0.4.0

func RunSecurityScan(req SecurityScanRequest) error

RunSecurityScan executes the full security scan pipeline from an explicit request. All inputs are taken from req — no package-level vars are referenced.

Types

type ExitError

type ExitError struct {
	Code int
	Err  error
}

ExitError wraps an error with a process exit code.

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type GovernanceReconcileOpts added in v0.5.0

type GovernanceReconcileOpts struct {
	DryRun  bool
	Apply   bool
	Source  string // override governance source repo URL
	Ref     string // override governance source ref
	Path    string // override governance clusters file path
	Config  *config.Config
	CICtx   *ci.CIContext // nil = not in CI (source resolution skips CI layer)
	Verbose bool
}

GovernanceReconcileOpts carries all inputs for governance reconciliation. No package globals, no cobra dependency — all execution state is explicit.

type ReleaseCreateRequest added in v0.4.0

type ReleaseCreateRequest struct {
	Ctx             context.Context
	RootDir         string
	Config          *config.Config
	Tag             string
	Ref             string // commit/branch the forge mints a synthesized tag from (e.g. dev-{sha8} on a push)
	Name            string
	NotesFile       string
	SecuritySummary string
	Draft           bool
	Prerelease      bool
	Assets          []string
	RegistryLinks   bool
	CatalogLinks    bool
	SkipSync        bool
	ReadOnly        bool // run_from: read-only mode — evaluate + narrate but do not mutate
	Verbose         bool
	Writer          io.Writer
}

ReleaseCreateRequest is the explicit input contract for RunReleaseCreate. Cobra command fills this from flags; CI runner fills it from config/ciCtx. Ctx is inside the request (matches docker.Request pattern).

type SecurityScanRequest added in v0.4.0

type SecurityScanRequest struct {
	Ctx            context.Context
	RootDir        string
	Config         *config.Config
	Image          string // explicit image ref; empty = auto-resolve from manifest
	OutputDir      string // empty = from Config.Security.OutputDir
	SBOM           bool
	FailOnCritical bool
	Skip           bool
	Detail         string // none|counts|detailed|full; empty = from config
	Strict         bool
	Verbose        bool
	Writer         io.Writer
}

SecurityScanRequest is the explicit input contract for RunSecurityScan. Cobra command fills this from flags; CI runner fills it from config/ciCtx. Ctx is inside the request (matches docker.Request pattern).

type SilentExitError added in v0.4.0

type SilentExitError struct {
	Code int
}

SilentExitError signals a non-zero exit without printing anything. Used when the error has already been rendered (e.g. summary + Exit Reason).

func (*SilentExitError) Error added in v0.4.0

func (e *SilentExitError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL