Documentation
¶
Overview ¶
Package delete provides functionality for deleting branches and their metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
// Start is called at the beginning of delete
Start(branchCount int)
// OnBranch is called for each branch being deleted
OnBranch(name string, status Status, prNumber *int)
// OnRestack is called when restacking children
OnRestack(childCount int)
// Complete is called when delete finishes
Complete(deleted, skipped int)
// Cleanup restores terminal state (may be no-op)
Cleanup()
// IsInteractive returns true if the handler supports interactive prompts
IsInteractive() bool
// PromptConfirm prompts user for confirmation before deleting
PromptConfirm(branch string, reason string) (bool, error)
}
Handler receives events from delete action
type NullHandler ¶
NullHandler is a no-op handler for when nil is passed. It embeds handler.NullBase for Cleanup() and IsInteractive().
func (*NullHandler) Complete ¶
func (h *NullHandler) Complete(int, int)
Complete implements Handler.
func (*NullHandler) OnBranch ¶
func (h *NullHandler) OnBranch(string, Status, *int)
OnBranch implements Handler.
func (*NullHandler) PromptConfirm ¶
func (h *NullHandler) PromptConfirm(string, string) (bool, error)
PromptConfirm implements Handler.
Click to show internal directories.
Click to hide internal directories.