format

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format int
const (
	FormatNone Format = iota
	CSV
	CompactJSON
	PrettyJSON
)

func NewFormat

func NewFormat(s string) (Format, error)

func (Format) String

func (f Format) String() string

type Outputter added in v0.0.3

type Outputter interface {
	// FormattedOutput takes a record and returns a string representation of
	// the record accourding to supplied format.
	Output(record interface{}, f Format) string
}

Outputter interface us a uniform way to create an output of a datum

Jump to

Keyboard shortcuts

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