ui

package
v0.19.767 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

1. Charmed version of the Step method 2. PrintEnv with redaction list

Index

Constants

View Source
const (
	ColorGreen  = "\033[032m"
	ColorRed    = "\033[31m"
	ColorYellow = "\033[33m"
	ColorReset  = "\033[0m"
)

Variables

This section is empty.

Functions

func EnvVars

func EnvVars(envVars map[string]any)

func Error

func Error(ctx context.Context, userErr error)

func FromContext

func FromContext(ctx context.Context) (*logger, error)

from context returns the logger from the ui

func GetStatusColor

func GetStatusColor(status string) string

func Line

func Line(ctx context.Context, msg string, args ...any)

func New

func New(v *validator.Validate, opts ...loggerOption) (*logger, error)

func PrintEnv

func PrintEnv(ctx context.Context, env map[string]string)

func SetQuietMode

func SetQuietMode(val bool)

func Step

func Step(ctx context.Context, msg string, args ...any)

Step records a step that happened, with a "check"

func Step2

func Step2(ctx context.Context, msg string, args ...any)

func WithContext

func WithContext(ctx context.Context, log *logger) context.Context

ui exposes methods for outputting state during the command

func WithJSON

func WithJSON(enableJSON bool) loggerOption

WithJSON outputs everything as json

func WithSilent

func WithSilent(silent bool) loggerOption

WithSilent prevents all output

Types

This section is empty.

Jump to

Keyboard shortcuts

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