ui

package
v0.19.1300 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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