output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Json

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

func (*Json) WriteRecords

func (j *Json) WriteRecords(w io.Writer, records []Record, fields []string) error

type Record

type Record map[string]string

type RecordWriter

type RecordWriter interface {
	// WriteRecords writes each record to w in order. If fields is non-nil,
	// it should provide a hint to the field ordering.
	WriteRecords(w io.Writer, records []Record, fields []string) error
}

func NewJson

func NewJson() RecordWriter

func NewTable

func NewTable() RecordWriter

type Table

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

Table is a RecordWriter that outputs records in tabular format

func (*Table) WriteRecords

func (t *Table) WriteRecords(w io.Writer, records []Record, fields []string) error

Write each record as a line. Note that fields defaults to all fields in the first record.

Jump to

Keyboard shortcuts

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