interactive

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInteractive

func IsInteractive() bool

IsInteractive checks if stdin is a TTY (terminal)

func PromptConfirmation

func PromptConfirmation(question string, preview string) (bool, error)

PromptConfirmation shows a yes/no confirmation prompt

Types

type BumpChoice

type BumpChoice struct {
	Type        BumpType
	Description string
	Preview     string
}

BumpChoice represents a selection choice for version bumping

func PromptBumpType

func PromptBumpType(currentVersion string, choices []BumpChoice) (*BumpChoice, error)

PromptBumpType shows an interactive selection for version bump type

type BumpType

type BumpType string

BumpType represents the type of version bump

const (
	BumpPatch BumpType = "patch"
	BumpMinor BumpType = "minor"
	BumpMajor BumpType = "major"
)

type SelectionResult

type SelectionResult struct {
	Choice   BumpChoice
	Canceled bool
}

SelectionResult holds the result of a selection prompt

Jump to

Keyboard shortcuts

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