plan

package
v0.13.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package plan implements the read-only "cascade plan" command. It renders, as a per-file unified diff, what "cascade generate-workflow" would change in the committed workflow and action files, writing nothing. plan is the human-facing preview counterpart to "cascade verify": where verify is a pass/fail CI gate, plan shows the actual diff and is purely informational, always exiting 0 on success. It reuses the same side-effect-free producer, generate.Plan.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the plan command, a read-only preview that renders, as a per-file unified diff, what generate-workflow would change in the committed workflow and action files.

func Run

func Run(o Options, stdout, stderr io.Writer) error

Run renders a per-file unified diff of every file the manifest would generate against the bytes committed on disk and writes nothing. A planned file that is absent on disk is rendered as a whole-file add (every line an addition); a planned file whose bytes differ is rendered as a unified hunk; a byte-identical planned file is skipped.

Run always returns nil on success regardless of whether any diff exists: the preview is informational, not a gate. It returns a plain error only for an operational failure (the manifest is missing or invalid, or a planned file cannot be read for a reason other than not existing), which cmd/cascade/main.go maps to exit code 1.

Run is read-only: it reads the manifest, the reusable-workflow stubs the generators inspect, and the committed files, and writes nothing.

Types

type Options

type Options struct {
	ConfigPath        string
	ManifestKey       string
	ActionFolder      string
	OutputPath        string
	PromoteOutputPath string
}

Options configures a plan run. The fields mirror the generate-workflow flags that determine which files the manifest emits and where they live.

Jump to

Keyboard shortcuts

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