describe

package
v0.17.14 Latest Latest
Warning

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

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

Documentation

Overview

Package describe implements the stackit describe command for managing stack descriptions.

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 implements the stackit describe command

func ParseEditorContent

func ParseEditorContent(content string) *git.StackDescription

ParseEditorContent parses the editor content into a StackDescription. Returns nil if the content is empty (abort).

func TruncateDescription

func TruncateDescription(s string, maxLen int) string

TruncateDescription truncates a description string for display. It returns the first line, truncated to maxLen characters if needed.

Types

type Handler

type Handler interface {
	// Cleanup restores terminal state (may be no-op)
	Cleanup()

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

Handler receives events from describe action

type NullHandler

type NullHandler struct {
	handler.NullBase
}

NullHandler is a no-op handler for when nil is passed. It embeds handler.NullBase for Cleanup() and IsInteractive().

type Options

type Options struct {
	Title       string // Set title directly (non-interactive)
	Description string // Set description directly (non-interactive)
	Clear       bool   // Remove the stack description
	Show        bool   // Display the current description
}

Options contains options for the describe command

Jump to

Keyboard shortcuts

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