fastcsv

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT, MIT Imports: 1 Imported by: 0

README

This is copy of https://bitbucket.org/weberc2/fastcsv/ which has been enhanced with a proposed bug fix with the patch attached to issue https://bitbucket.org/weberc2/fastcsv/issues/6/some-fields-quoted-fails applied.

It also contains support for configurable (ascii) delimiter.

The original licence (MIT) can be found in the LICENCE file in the current directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(r io.Reader, delimiter byte) Reader

Constructs a new Reader from a source CSV io.Reader

func (*Reader) Err

func (r *Reader) Err() error

Return the last error encountered; returns nil if no error was encountered or if the last error was io.EOF.

func (*Reader) Fields

func (r *Reader) Fields() [][]byte

Returns the last row of fields encountered. These fields are only valid until the next call to Next() or Read().

func (*Reader) Next

func (r *Reader) Next() bool

Scans in the next row

func (*Reader) Read

func (r *Reader) Read() ([][]byte, error)

Read and return the next row and/or any errors encountered. The byte slices are only valid until the next call to Next() or Read(). Returns nil, io.EOF when the file is consumed.

Jump to

Keyboard shortcuts

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