pretty

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoxItems

func BoxItems(items []string, color string) string

func BoxSection

func BoxSection(title, content, color string) string

func Color

func Color(s string) string

Color returns a string with color and other formatting applied. Under the hood, this function uses the colorstring package: github.com/mitchellh/colorstring

func Colorf

func Colorf(format string, a ...interface{}) string

Colorf returns a string with color and other formatting applied. When inserting user-provided values into a format string, use this function instead of Color. This is to avoid mistakenly interpreting user data as formatting directives.

func DisableColors

func DisableColors()

DisableColors disables colors and other formatting.

func EnableColors

func EnableColors()

EnableColors enables colors and other formatting.

func Error

func Error(err error) string

func StyledNumComparisons

func StyledNumComparisons(n int) string

func StyledNumMatches

func StyledNumMatches(n int) string

func StyledNumMoves

func StyledNumMoves(n int) string

Types

type Summarizer

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

Summarizer is used to pretty print a summary of the tfautomv engine's findings.

func NewSummarizer

func NewSummarizer(moves []engine.Move, comparisons []engine.ResourceComparison, verbosity int) Summarizer

NewSummarizer returns a ready-to-use Summarizer.

func (*Summarizer) StyledModule

func (s *Summarizer) StyledModule(module string) string

func (*Summarizer) Summary

func (s *Summarizer) Summary() string

Jump to

Keyboard shortcuts

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