cancel

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package cancel implements the `aiwf cancel` verb. It is the per-verb subpackage that cmd/aiwf/main.go's newRootCmd wires via NewCmd(); per the M-0115 pattern, every cmd/aiwf verb lives under internal/cli/<verb>/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(correlationID string) *cobra.Command

NewCmd builds `aiwf cancel <id> [--reason "..."]`. The verb is the kind-aware terminal-cancel transition: an epic cancels to "cancelled", a gap to "wontfix", an ADR to "rejected", etc. — the per-kind FSM target lives in entity.AllowedTransitions and the verb layer.

func Run

func Run(opts Options) (code int)

Run executes `aiwf cancel`. Returns one of the cliutil.Exit* codes; the caller (RunE in NewCmd) wraps the int in cliutil.WrapExitCode so Cobra's RunE channel preserves the exit code through the run() dispatcher.

Types

type Options added in v0.31.0

type Options struct {
	ID        string
	Actor     string
	Principal string
	Root      string
	Reason    string
	Force     bool
	AuditOnly bool
	Out       cliutil.OutputFormat
}

Options carries the `aiwf cancel` invocation inputs to Run. Collapsing the previously-positional signature into a named struct removes the transpose-two-strings hazard the long positional form carried, mirroring internal/verb's PromoteOptions / AddOptions convention at the CLI adapter boundary (G-0227).

Jump to

Keyboard shortcuts

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