output

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RadRed           = color.New(color.FgRed).Add(color.Bold).SprintFunc()
	DeepNightBlue    = color.New(color.FgBlue).Add(color.FgBlack).SprintFunc()
	MegaportYellow   = color.New(color.FgHiYellow).SprintFunc()
	MegaportOrange   = color.New(color.FgHiRed).SprintFunc()
	MegaportRed      = color.New(color.FgRed).SprintFunc()
	MegaportPurple   = color.New(color.FgMagenta).SprintFunc()
	RadRedReadable   = color.New(color.FgHiRed).Add(color.Bold).SprintFunc()
	DeepBlueReadable = color.New(color.FgBlue).Add(color.Bold).SprintFunc()
	YellowReadable   = color.New(color.FgYellow).Add(color.Bold).SprintFunc()
	OrangeReadable   = color.New(color.FgRed).Add(color.FgYellow).SprintFunc()
	PurpleReadable   = color.New(color.FgHiMagenta).Add(color.Bold).SprintFunc()
	NexusBlue        = color.New(color.FgBlue).Add(color.Bold).SprintFunc()
	DodgerBlue       = color.New(color.FgHiBlue).Add(color.Bold).SprintFunc()
	SkyBlue          = color.New(color.FgHiCyan).SprintFunc()
	PurpleCloud      = color.New(color.FgMagenta).Add(color.Bold).SprintFunc()
	Plum             = color.New(color.FgHiMagenta).SprintFunc()
	Mauve            = color.New(color.FgHiMagenta).Add(color.Faint).SprintFunc()
	Pink             = color.New(color.FgMagenta).Add(color.Italic).SprintFunc()
	Magenta          = color.New(color.FgHiMagenta).Add(color.Bold).SprintFunc()
	SunsetOrange     = color.New(color.FgRed).Add(color.FgHiYellow).SprintFunc()
	BlackHole        = color.New(color.FgBlack).Add(color.Bold).SprintFunc()
	DarkBlue         = color.New(color.FgBlue).Add(color.Underline).SprintFunc()
	GoldYellow       = color.New(color.FgYellow).Add(color.Bold).SprintFunc()
	Teal             = color.New(color.FgCyan).Add(color.Bold).SprintFunc()
	LinkGreen        = color.New(color.FgGreen).Add(color.Bold).SprintFunc()
	ElectricLime     = color.New(color.FgHiGreen).SprintFunc()
)

Functions

func CaptureOutput

func CaptureOutput(f func()) string

func CaptureOutputErr

func CaptureOutputErr(f func() error) (string, error)

func FormatCommandName

func FormatCommandName(name string, noColor bool) string

func FormatConfirmation

func FormatConfirmation(msg string, noColor bool) string

func FormatExample

func FormatExample(example string, noColor bool) string

func FormatJSONExample

func FormatJSONExample(json string, noColor bool) string

func FormatNewValue added in v0.3.4

func FormatNewValue(value string, noColor bool) string

func FormatOldValue added in v0.3.4

func FormatOldValue(value string, noColor bool) string

func FormatOptionalFlag

func FormatOptionalFlag(flag string, description string, noColor bool) string

func FormatPrompt

func FormatPrompt(msg string, noColor bool) string

func FormatRequiredFlag

func FormatRequiredFlag(flag string, description string, noColor bool) string

func FormatSuccess

func FormatSuccess(msg string, noColor bool) string

func FormatUID

func FormatUID(uid string, noColor bool) string

func PrintError

func PrintError(format string, noColor bool, args ...interface{})

func PrintInfo

func PrintInfo(format string, noColor bool, args ...interface{})

func PrintOutput

func PrintOutput[T OutputFields](data []T, format string, noColor bool) error

func PrintResourceCreated

func PrintResourceCreated(resourceType, uid string, noColor bool)

func PrintResourceDeleted

func PrintResourceDeleted(resourceType, uid string, immediate, noColor bool)

func PrintResourceSuccess

func PrintResourceSuccess(resourceType, action, uid string, noColor bool)

func PrintResourceUpdated

func PrintResourceUpdated(resourceType, uid string, noColor bool)

func PrintSuccess

func PrintSuccess(format string, noColor bool, args ...interface{})

func PrintWarning

func PrintWarning(format string, noColor bool, args ...interface{})

func StripANSIColors

func StripANSIColors(s string) string

Types

type Output

type Output interface {
	// contains filtered or unexported methods
}

type OutputFields

type OutputFields interface {
	any
}

type ResourceTag added in v0.4.3

type ResourceTag struct {
	Key   string `json:"key" header:"KEY"`
	Value string `json:"value" header:"VALUE"`
}

type Spinner added in v0.4.0

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

func NewSpinner added in v0.4.0

func NewSpinner(noColor bool) *Spinner

func PrintCustomSpinner added in v0.4.4

func PrintCustomSpinner(action, resourceId string, noColor bool) *Spinner

func PrintListingResourceTags added in v0.4.3

func PrintListingResourceTags(resourceType, uid string, noColor bool) *Spinner

func PrintLoggingIn added in v0.4.3

func PrintLoggingIn(noColor bool) *Spinner

func PrintResourceCreating added in v0.4.0

func PrintResourceCreating(resourceType, uid string, noColor bool) *Spinner

func PrintResourceDeleting added in v0.4.0

func PrintResourceDeleting(resourceType, uid string, noColor bool) *Spinner

func PrintResourceGetting added in v0.4.0

func PrintResourceGetting(resourceType, uid string, noColor bool) *Spinner

func PrintResourceListing added in v0.4.0

func PrintResourceListing(resourceType string, noColor bool) *Spinner

func PrintResourceUpdating added in v0.4.0

func PrintResourceUpdating(resourceType, uid string, noColor bool) *Spinner

func PrintResourceValidating added in v0.4.3

func PrintResourceValidating(resourceType string, noColor bool) *Spinner

func (*Spinner) Start added in v0.4.0

func (s *Spinner) Start(prefix string)

func (*Spinner) Stop added in v0.4.0

func (s *Spinner) Stop()

func (*Spinner) StopWithSuccess added in v0.4.0

func (s *Spinner) StopWithSuccess(msg string)

Jump to

Keyboard shortcuts

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