output

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInitialPadding = 0
View Source
const ExtraPadding = DefaultInitialPadding + 3

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(pf *pflag.FlagSet)

func CommandName

func CommandName() string

func DisableColor

func DisableColor()

func EnableColor

func EnableColor()

func Print

func Print(padding Padding, title string)

func ReplaceCommandStrings

func ReplaceCommandStrings(str string) string

func SetOutput

func SetOutput(w io.Writer)

Types

type HumanOutput

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

func NewHumanOutput

func NewHumanOutput() *HumanOutput

func (HumanOutput) Errorf

func (h HumanOutput) Errorf(err error, format string, a ...interface{})

func (HumanOutput) Fatalf

func (h HumanOutput) Fatalf(err error, format string, a ...interface{})

func (HumanOutput) Infof

func (h HumanOutput) Infof(format string, a ...interface{})

func (HumanOutput) Println

func (h HumanOutput) Println(a ...interface{})

func (HumanOutput) Sub

func (h HumanOutput) Sub() *HumanOutput

func (HumanOutput) Titlef

func (h HumanOutput) Titlef(format string, a ...interface{})

func (HumanOutput) Warnf

func (h HumanOutput) Warnf(format string, a ...interface{})

func (*HumanOutput) WithDetails

func (h *HumanOutput) WithDetails(key string, value interface{}, fields ...interface{}) *HumanOutput

type Padding

type Padding int

type TableOrStructPrinter

type TableOrStructPrinter struct {
	ColumnDefinitions []metav1.TableColumnDefinition
	Printer           printers.ResourcePrinter
	PrintFlags        *get.PrintFlags
	Operation         func() string
	ObjectToRow       func(obj runtime.Object) metav1.TableRow
	// contains filtered or unexported fields
}

func NewActionCLITableOrStruct

func NewActionCLITableOrStruct(
	out io.Writer,
	flags *get.PrintFlags,
	printer printers.ResourcePrinter,
) *TableOrStructPrinter

func NewPushFileOnlyCLITableOrStruct

func NewPushFileOnlyCLITableOrStruct(
	flags *get.PrintFlags,
	printer printers.ResourcePrinter,
) *TableOrStructPrinter

func (*TableOrStructPrinter) Flush

func (t *TableOrStructPrinter) Flush()

func (*TableOrStructPrinter) Print

func (t *TableOrStructPrinter) Print(obj runtime.Object) error

func (*TableOrStructPrinter) PrintObj

func (t *TableOrStructPrinter) PrintObj(obj runtime.Object, w io.Writer) error

Jump to

Keyboard shortcuts

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