console

package
v0.1.0-alpha.65 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(cmd *cli.Command, flagName, title, description string, defaultValue bool) (bool, error)

func Field

func Field(field huh.Field) error

func GetFormKeyMap

func GetFormKeyMap() *huh.KeyMap

GetFormKeyMap returns the standard huh keymap used across all forms

func GetFormTheme

func GetFormTheme(indent int) *huh.Theme

GetFormTheme returns the standard huh theme used across all forms

func Hyperlink(url, text string) string

func SError

func SError(indent int, format string, args ...any) string

func SHeader

func SHeader(format string, args ...any) string

func SInfo

func SInfo(indent int, format string, args ...any) string

func SProgress

func SProgress(indent int, format string, args ...any) string

func SProperty

func SProperty(indent int, key, msg string) string

func SSuccess

func SSuccess(indent int, format string, args ...any) string

func SWarn

func SWarn(indent int, format string, args ...any) string

func Spacer

func Spacer()

func Spinner

func Spinner(message string, operation func() error) error

Spinner runs the given operation with a spinner and message

Types

type Group

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

Group represents a nested logging group

func Error

func Error(format string, args ...any) Group
func Header(format string, args ...any) Group

func Info

func Info(format string, args ...any) Group

func NewGroup

func NewGroup(silent bool) Group

func Progress

func Progress(format string, args ...any) Group

func Property

func Property(key, msg string) Group

func Success

func Success(format string, args ...any) Group

func Warn

func Warn(format string, args ...any) Group

func (Group) Confirm

func (g Group) Confirm(cmd *cli.Command, flagName, title, description string, defaultValue bool) (bool, Group, error)

func (Group) Error

func (g Group) Error(format string, args ...any) Group

func (Group) Field

func (g Group) Field(field huh.Field) error

func (Group) Info

func (g Group) Info(format string, args ...any) Group

func (Group) Progress

func (g Group) Progress(format string, args ...any) Group

func (Group) Property

func (g Group) Property(key, msg string) Group

func (Group) Spinner

func (g Group) Spinner(message string, operation func() error) error

Spinner runs the given operation with a spinner and message, respecting the group's indent

func (Group) Success

func (g Group) Success(format string, args ...any) Group

func (Group) Warn

func (g Group) Warn(format string, args ...any) Group

Jump to

Keyboard shortcuts

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