format

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CsvFormat

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

func NewCsvFormat

func NewCsvFormat(w io.Writer) *CsvFormat

func (*CsvFormat) Close

func (cf *CsvFormat) Close() error

func (*CsvFormat) Write

func (cf *CsvFormat) Write(line []interface{}) error

func (*CsvFormat) WriteHeader

func (cf *CsvFormat) WriteHeader(headers []string) error

type Format

type Format interface {
	WriteHeader(headers []string) error
	Write(line []interface{}) error
	Close() error
}

func NewFormat

func NewFormat(id string, w io.Writer) (Format, error)

type JsonFormat

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

func NewJsonFormat

func NewJsonFormat(w io.Writer) *JsonFormat

func (*JsonFormat) Close

func (cf *JsonFormat) Close() error

func (*JsonFormat) Write

func (cf *JsonFormat) Write(line []interface{}) error

func (*JsonFormat) WriteHeader

func (cf *JsonFormat) WriteHeader(headers []string) error

type PrettyFormat

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

func NewPrettyFormat

func NewPrettyFormat(w io.Writer) *PrettyFormat

func (*PrettyFormat) Close

func (pf *PrettyFormat) Close() error

func (*PrettyFormat) Write

func (pf *PrettyFormat) Write(line []interface{}) error

func (*PrettyFormat) WriteHeader

func (pf *PrettyFormat) WriteHeader(headers []string) error

Jump to

Keyboard shortcuts

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