parsers

package
v0.0.0-...-39d6a1f Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeFile

func DecodeFile(path string) (io.Reader, error)

Types

type CSVParser

type CSVParser struct{}

func (CSVParser) Parse

func (p CSVParser) Parse(r io.Reader) (Table, error)

type ColNotFound

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

func (ColNotFound) Error

func (e ColNotFound) Error() string

type EmptyFileError

type EmptyFileError struct{}

func (EmptyFileError) Error

func (e EmptyFileError) Error() string

type FixedWidthParser

type FixedWidthParser struct {
	Columns []string
}

func (FixedWidthParser) Parse

func (p FixedWidthParser) Parse(r io.Reader) (Table, error)

type Parser

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

type Table

type Table struct {
	Filename string
	Headers  []string
	Rows     [][]string
}

Jump to

Keyboard shortcuts

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