utils

package
v1.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LogLevelTrace   = "Trace"
	LogLevelDebug   = "Debug"
	LogLevelInfo    = "Info"
	LogLevelWarning = "Warning"
)
View Source
const (
	ColorReset     = "\033[0m"
	ColorGreen     = "\033[32m"
	ColorYellow    = "\033[33m"
	ColorRed       = "\033[31m"
	ColorBold      = "\033[1m"
	ColorUnderline = "\033[4m"
)

Variables

This section is empty.

Functions

func DirExists added in v1.7.0

func DirExists(dir string) bool

Check if a directory exists

func LogError

func LogError(err error)

LogError logs errors to std.Error

func LogErrorAndExit

func LogErrorAndExit(err error)

LogErrorAndExit logs errors to std.Error and exits with an error code

func TerraformFilesExist added in v1.7.0

func TerraformFilesExist(dir string) (bool, error)

Check if Terraform files exist in a directory

Types

type Spinner added in v1.14.0

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

func NewSpinner added in v1.14.0

func NewSpinner(text string) *Spinner

Initialize a new spinner

func (*Spinner) Start added in v1.14.0

func (sp *Spinner) Start()

Start the spinner

func (*Spinner) Stop added in v1.14.0

func (sp *Spinner) Stop()

Stop the spinner

Jump to

Keyboard shortcuts

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