printer

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONPrinter

func JSONPrinter(data interface{}) ([]byte, error)

func YAMLPrinter

func YAMLPrinter(data interface{}) ([]byte, error)

Types

type PrintFlags

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

func NewPrintFlags

func NewPrintFlags() *PrintFlags

func (*PrintFlags) AddFlags

func (p *PrintFlags) AddFlags(c *cobra.Command)

func (*PrintFlags) AllowedFormats

func (p *PrintFlags) AllowedFormats() []string

func (*PrintFlags) Print

func (p *PrintFlags) Print(pr ResourcePrinter, w io.Writer) error

TODO

type ResourcePrinter

type ResourcePrinter interface {
	JSONPrint() ([]byte, error)
	YAMLPrint() ([]byte, error)
	TablePrint() ([]string, [][]string)
}

Jump to

Keyboard shortcuts

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