csv

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Csv

type Csv struct {
	ParsedCount int // data lines parsed count (data lines refers to lines below title columns)
	TriedCount  int // data lines tried count (data lines refers to lines below title columns)
	// contains filtered or unexported fields
}

Csv defines a struct for csv parsing and handling

func (*Csv) BeginCsvReader

func (c *Csv) BeginCsvReader() error

BeginCsvReader will start the csv parsing, this is called AFTER SkipHeaderRow is called, this sets the csv reader object and allows csv parsing access

func (*Csv) Close

func (c *Csv) Close() error

Close will close a csv file

func (*Csv) Open

func (c *Csv) Open(path string) error

Open will open a csv file path for access

func (*Csv) ReadCsv

func (c *Csv) ReadCsv() (eof bool, record []string, err error)

ReadCsv will read the current line of csv row, and return parsed csv elements, each time ReadCsv is called, the next row of csv is read

func (*Csv) SkipHeaderRow

func (c *Csv) SkipHeaderRow() error

SkipHeaderRow will skip one header row, before calling csv parser loop, call this skip row to advance forward

Jump to

Keyboard shortcuts

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