printer

package
v1.0.76-rc Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SmartPrint added in v1.0.61

func SmartPrint(p Printer, obj interface{}, err error, errStr string, opt Options, w io.Writer) error

SmartPrint prints the object or print the error if not nil using a Printer

Types

type Options

type Options struct{}

Options is the struct used to pass options to the printer

type Printer

type Printer interface {
	// Print will write the object in the writer using the given options
	Print(obj interface{}, opt Options, w io.Writer) error
}

Printer is an interface that knows how to print runtime objects

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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