terminal

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fprintf

func Fprintf(w io.Writer, format string, a ...any) (int, error)

func GetProgressMessageWidth

func GetProgressMessageWidth(displayPath bool) int

func GetProgressWriter

func GetProgressWriter(displayPath bool) progress.Writer

func GetShortTrackerMessage

func GetShortTrackerMessage(taskType string, taskName string, messageLen int) string

func GetTrackerName

func GetTrackerName(taskType string, taskName string) string

func InitTerminalOutput

func InitTerminalOutput()

func Input

func Input(msg string) string

func InputInt

func InputInt(msg string) int

func InputPassword

func InputPassword(msg string) string

func InputYN

func InputYN(msg string) bool

InputYN inputs Y or N true for Y, false for N

func Print

func Print(a ...any) (n int, err error)

func PrintErrorf

func PrintErrorf(format string, a ...any) (int, error)

func PrintInfof

func PrintInfof(format string, a ...any) (n int, err error)

func PrintInfoln

func PrintInfoln(a ...any) (n int, err error)

func Printf

func Printf(format string, a ...any) (n int, err error)

func Println

func Println(a ...any) (n int, err error)

Types

type ProgressTrackerCallback

type ProgressTrackerCallback func(taskType string, taskName string, processed int64, total int64, unit progress.Units, errored bool)

type TerminalWriter

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

func GetTerminalWriter

func GetTerminalWriter() *TerminalWriter

func (*TerminalWriter) Lock

func (writer *TerminalWriter) Lock()

func (*TerminalWriter) Unlock

func (writer *TerminalWriter) Unlock()

func (*TerminalWriter) Write

func (writer *TerminalWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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