pkg

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(p Parser, r io.Reader, w io.Writer, enablePbcopy bool) error

Format converts the content of the reader to a table format using the supplied parser and writes it to the writer.

Types

type CSVParser

type CSVParser struct{}

CSVParser is a parser implementation that parses CSV documents.

func (*CSVParser) Parse

func (c *CSVParser) Parse(reader io.Reader) (Content, error)

Parse converts the content of a reader to the Content representation.

type Content

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

Content is the intermediate representation before it is converted to a table format.

type JSONParser

type JSONParser struct{}

JSONParser is a parser implementation that parses JSON documents.

func (*JSONParser) Parse

func (j *JSONParser) Parse(reader io.Reader) (Content, error)

Parse converts the content of a reader to the Content representation.

type Parser

type Parser interface {
	Parse(io.Reader) (Content, error)
}

Parser describes an interface to Parse an arbitrary document into our intermediate Content form.

Jump to

Keyboard shortcuts

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