Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Colorize added in v0.4.0

func Colorize() *colorstring.Colorize

Colorize initializes the ui colorization.

func InitUI added in v0.4.0

func InitUI(quiet, color bool, outputFormat string)

func ParseJsonFromFileOrStdin added in v0.4.0

func ParseJsonFromFileOrStdin(filePath string) (map[string]interface{}, error)

Types

type ColorizeUi added in v0.4.0

type ColorizeUi struct {
	Colorize     *colorstring.Colorize
	OutputColor  string
	InfoColor    string
	ErrorColor   string
	WarnColor    string
	Ui           cli.Ui
	Quiet        bool
	OutputFormat *output.OutputFormat
}
var UI ColorizeUi

func (*ColorizeUi) Ask added in v0.4.0

func (u *ColorizeUi) Ask(query string) (string, error)

func (*ColorizeUi) AskSecret added in v0.4.0

func (u *ColorizeUi) AskSecret(query string) (string, error)

func (*ColorizeUi) Error added in v0.4.0

func (u *ColorizeUi) Error(message string)

func (*ColorizeUi) Info added in v0.4.0

func (u *ColorizeUi) Info(message string)

func (*ColorizeUi) JsonOutput added in v0.4.0

func (u *ColorizeUi) JsonOutput(input interface{}, outputFormat *output.OutputFormat)

JsonOutput pretty prints the data specified in the input. Callers can optionally supply a jsonpath template to pull out nested data in input. This leverages the kubernetes jsonpath libs (https://kubernetes.io/docs/reference/kubectl/jsonpath/).

func (*ColorizeUi) Output added in v0.4.0

func (u *ColorizeUi) Output(message string)

func (*ColorizeUi) Warn added in v0.4.0

func (u *ColorizeUi) Warn(message string)

Jump to

Keyboard shortcuts

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