output

package
v0.0.0-...-994c998 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY() bool

IsTTY returns true if stdout is a terminal and GITTE_NO_TTY is not set

Types

type OutputMode

type OutputMode int

OutputMode controls how output is rendered

const (
	ModeTTY   OutputMode = iota // BubbleTea TUI
	ModePlain                   // Plain structured text
)

func DetectMode

func DetectMode(noTTY bool) OutputMode

DetectMode returns the appropriate output mode

type PlainWriter

type PlainWriter struct {
	// contains filtered or unexported fields
}

PlainWriter writes structured plain-text output for non-TTY environments

func NewPlainWriter

func NewPlainWriter() *PlainWriter

NewPlainWriter creates a PlainWriter that writes to stdout

func (*PlainWriter) Summary

func (w *PlainWriter) Summary(succeeded, failed int, elapsed time.Duration)

Summary prints the final run summary

func (*PlainWriter) TaskDone

func (w *PlainWriter) TaskDone(prefix, name string)

TaskDone prints a SUCCESS line with elapsed time

func (*PlainWriter) TaskFailed

func (w *PlainWriter) TaskFailed(prefix, name string, attempt, maxAttempts int, retryIn string)

TaskFailed prints a FAILED line with optional retry info

func (*PlainWriter) TaskLine

func (w *PlainWriter) TaskLine(prefix, name, line string)

TaskLine prints a log line for the given task

func (*PlainWriter) TaskStarted

func (w *PlainWriter) TaskStarted(prefix, name string)

TaskStarted prints a RUNNING line for the given task

type TUIMsg

type TUIMsg struct {
	TaskName string
	Status   TaskStateStatus
	Line     string // if non-empty, a log line to append
}

TUIMsg is sent to the BubbleTea program to update task state

type TaskState

type TaskState struct {
	Name      string
	Status    TaskStateStatus
	StartTime time.Time
	EndTime   time.Time
	Lines     []string // accumulated log lines
}

TaskState holds the display state of a single task

type TaskStateStatus

type TaskStateStatus int

TaskStateStatus represents the current state of a task in the TUI

const (
	TaskPending TaskStateStatus = iota
	TaskRunning
	TaskSuccess
	TaskFailed
)

func (TaskStateStatus) Icon

func (s TaskStateStatus) Icon() string

Jump to

Keyboard shortcuts

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