output

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltinTypes = []Type{DEFAULT, JSON, YAML}

Functions

This section is empty.

Types

type DefaultOutput

type DefaultOutput struct {
	io.Writer
}

func (*DefaultOutput) Print

func (d *DefaultOutput) Print(obj interface{}, filters []string, title string) error

type JsonOutput

type JsonOutput struct {
	DefaultOutput
}

func (*JsonOutput) Print

func (j *JsonOutput) Print(obj interface{}, filters []string, title string) error

type Outputer

type Outputer interface {
	Print(obj interface{}, filters []string, title string) error
}

func NewOutput

func NewOutput(t Type, writer io.Writer) Outputer

type Type

type Type string
const (
	DEFAULT Type = "default"
	JSON    Type = "json"
	YAML    Type = "yaml"
)

type YamlOutput

type YamlOutput struct {
	DefaultOutput
}

func (*YamlOutput) Print

func (j *YamlOutput) Print(obj interface{}, filters []string, title string) error

Jump to

Keyboard shortcuts

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