abort

package
v0.17.15 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package abort implements the stackit abort command for canceling in-progress operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(ctx *app.Context, opts Options, handler Handler) error

Action cancels an in-progress operation

Types

type Handler

type Handler interface {
	// PromptConfirmAbort prompts user to confirm aborting the current operation
	// Returns true to proceed with abort, false to cancel
	PromptConfirmAbort() (bool, error)

	// Cleanup restores terminal state (may be no-op)
	Cleanup()

	// IsInteractive returns true if the handler supports interactive prompts
	IsInteractive() bool
}

Handler receives events from abort action

type NullHandler

type NullHandler struct {
	handler.NullBase
}

NullHandler is a no-op handler for when nil is passed

func (*NullHandler) PromptConfirmAbort

func (h *NullHandler) PromptConfirmAbort() (bool, error)

PromptConfirmAbort implements Handler. Returns false (cancel) for null handler.

type Options

type Options struct {
	Force bool
}

Options contains options for the abort command

Jump to

Keyboard shortcuts

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