output

package
v0.0.0-...-059d9f2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	JSON = "json"
	YAML = "yaml"
	YML  = "yml"
	TOML = "toml"
)
View Source
const WRITE_SUCCESS = "File successfully written to: %s"

Variables

View Source
var WriteDetailsToFile = cmdutil.WriteDetailsToFile

Functions

func Print

func Print(out TypeOutputInterface) error

Types

type DescribeOutput

type DescribeOutput struct {
	GeneralOutput `json:"-" yaml:"-" toml:"-"`
	Fields        map[string]string
	Values        interface{}
	Field         string // Used for large character values like codes or scripts that break the table.
}

func (*DescribeOutput) Format

func (d *DescribeOutput) Format() (bool, error)

func (*DescribeOutput) Output

func (c *DescribeOutput) Output()

type ErrorOutput

type ErrorOutput struct {
	GeneralOutput `json:"-" yaml:"-" toml:"-"`
	Err           error `json:"error"`
}

func (*ErrorOutput) Format

func (e *ErrorOutput) Format() (bool, error)

func (*ErrorOutput) Output

func (e *ErrorOutput) Output()

type GeneralOutput

type GeneralOutput struct {
	Msg   string        `json:"message,omitempty" yaml:"message,omitempty" toml:"message,omitempty"`
	Out   io.Writer     `json:"-" yaml:"-" toml:"-"`
	Flags cmdutil.Flags `json:"-" yaml:"-" toml:"-"`
}

func (*GeneralOutput) Format

func (g *GeneralOutput) Format() (bool, error)

func (*GeneralOutput) Output

func (g *GeneralOutput) Output()

type ListOutput

type ListOutput struct {
	GeneralOutput `json:"-" yaml:"-" toml:"-"`
	Columns       []string   `json:"columns" yaml:"columns" toml:"columns"`
	Lines         [][]string `json:"lines" yaml:"lines" toml:"lines"`
}

func (*ListOutput) Format

func (l *ListOutput) Format() (bool, error)

func (*ListOutput) Output

func (c *ListOutput) Output()

type MockTypeOutputInterface

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

func (*MockTypeOutputInterface) Format

func (m *MockTypeOutputInterface) Format() (bool, error)

func (*MockTypeOutputInterface) Output

func (m *MockTypeOutputInterface) Output()

type Output

type Output struct {
	Output TypeOutputInterface
}

type RawOutput

type RawOutput struct {
	Bytes []byte        `json:"-" yaml:"-" toml:"-"`
	Out   io.Writer     `json:"-" yaml:"-" toml:"-"`
	Flags cmdutil.Flags `json:"-" yaml:"-" toml:"-"`
}

func (*RawOutput) Format

func (r *RawOutput) Format() (bool, error)

func (*RawOutput) Output

func (r *RawOutput) Output()

type SliceOutput

type SliceOutput struct {
	Messages []string `json:"messages" yaml:"messages" toml:"messages"`
	GeneralOutput
}

func (*SliceOutput) Format

func (i *SliceOutput) Format() (bool, error)

func (*SliceOutput) Output

func (i *SliceOutput) Output()

type TypeOutputInterface

type TypeOutputInterface interface {
	Output()
	Format() (bool, error)
}

Jump to

Keyboard shortcuts

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