csv

package
v0.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	Delimiter       rune
	QuoteChar       rune
	EscapeChar      rune
	DoubleQuoteStr  string
	Encoding        string
	DoubleQuote     bool
	NewlinesInValue bool
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) GetOffset

func (r *Reader) GetOffset() int64

GetOffset returns the offset(amount of bytes read by the reader).

func (*Reader) ReadAll

func (r *Reader) ReadAll() ([][]string, error)

func (*Reader) ReadLine

func (r *Reader) ReadLine() ([]string, error)

func (*Reader) ValidateOneLine

func (r *Reader) ValidateOneLine(line string) (int, error)

type Splitter

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

Splitter splits CSV formatted data into separate entries, taking into account line breaks, quoting and escaping, and writes those entries into the given writer.

func NewSplitter

func NewSplitter(reader io.Reader, writer io.Writer) *Splitter

func NewSplitterSize

func NewSplitterSize(reader io.Reader, writer io.Writer, size int) *Splitter

func (*Splitter) ConsumeRow

func (s *Splitter) ConsumeRow() error

ConsumeRow reads one CSV entry from the input and writes it into the writer.

Jump to

Keyboard shortcuts

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