helper

package
v0.0.0-...-7a2772b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintBoldMessage

func PrintBoldMessage(message string, value ...color.Attribute)

Prints the given message in bold with optional color attributes.

func PrintHeader

func PrintHeader()

Prints a stylized header to the console using different colors.

func PrintLine

func PrintLine(value ...color.Attribute)

Prints a bold line across the terminal width.

func PrintMessage

func PrintMessage(message string, value ...color.Attribute)

Prints a message to the console with optional color attributes.

func PrintSection

func PrintSection(value string)

Prints a section header with the specified value.

Types

type RetryHelper

type RetryHelper struct {
	Retry     int           `json:"retry" description:"How many times to retry the operation"`
	RetryTime time.Duration `json:"retry-time" description:"How long to wait between retries"`
}

func (*RetryHelper) DoRetry

func (r *RetryHelper) DoRetry(handler func(int) error) error

type RetryableErr

type RetryableErr struct {
	Err error
}

func (RetryableErr) Error

func (e RetryableErr) Error() string

func (RetryableErr) Unwrap

func (e RetryableErr) Unwrap() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳