zcsv

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidColumn = errors.New("no column with that name exists")
	ErrNoData        = errors.New("no data exists for that column")
)

Functions

This section is empty.

Types

type CsvReader

type CsvReader struct {
	*csv.Reader
	// contains filtered or unexported fields
}

func NewReader

func NewReader(source io.Reader, headers []string) (reader *CsvReader)

func (*CsvReader) Headers

func (r *CsvReader) Headers() (cols []string, err error)

func (*CsvReader) Read

func (r *CsvReader) Read() (line Line, err error)

func (*CsvReader) ReadAll

func (r *CsvReader) ReadAll() (lines []Line, err error)

type Line

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

func (Line) Data added in v0.9.19

func (l Line) Data() []string

func (Line) Get

func (l Line) Get(key string) (val string, err error)

func (Line) MustGet added in v0.9.19

func (l Line) MustGet(key string) string

Jump to

Keyboard shortcuts

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