formatting

package
v0.0.0-...-44ef99d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	LogFormat  = "log"
	JSONFormat = "json"
	YAMLFormat = "yaml"
)

Formatting options for Messages

Variables

View Source
var (
	MsgOutputFormatKeys = []string{LogFormat, JSONFormat, YAMLFormat}
	MsgOutputFormats    = make(map[string]bool)
)

Functions

func IstioctlColorDefault

func IstioctlColorDefault(writer io.Writer) bool

func Print

func Print(ms diag.Messages, format string, colorize bool) (string, error)

Print output messages in the specified format with color options

Types

type MessageThreshold

type MessageThreshold struct {
	diag.Level
}

MessageThreshold is a wrapper around Level to be used as a cobra command line argument. It should satisfy the pflag.Value interface.

func (*MessageThreshold) Set

func (m *MessageThreshold) Set(s string) error

Set is a function declared in the pflag.Value interface

func (*MessageThreshold) String

func (m *MessageThreshold) String() string

String is a function declared in the pflag.Value interface

func (*MessageThreshold) Type

func (m *MessageThreshold) Type() string

Type is a function declared in the pflag.Value interface

Jump to

Keyboard shortcuts

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