csvparser

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 2 Imported by: 0

README

csv-parser

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnclosersRunes = map[EncloserId]Encloser{
	DoubleQuotes:   Encloser{'"', '"'},
	SingleQuotes:   Encloser{'\'', '\''},
	RoundBrackets:  Encloser{'(', ')'},
	SquareBrackets: Encloser{'[', ']'},
	CurlyBrackets:  Encloser{'{', '}'},
}

Functions

This section is empty.

Types

type Encloser

type Encloser struct {
	Open  byte
	Close byte
}

type EncloserId

type EncloserId int
const (
	None EncloserId = iota
	DoubleQuotes
	SingleQuotes
	RoundBrackets
	SquareBrackets
	CurlyBrackets
)

type Parser added in v0.0.4

type Parser struct {
	Enclosers []EncloserId
	Delimiter string
	Fields    []string
	Line      string
}

func (*Parser) ExtractEnclosedFieldValue added in v0.0.4

func (parser *Parser) ExtractEnclosedFieldValue(endChar byte) error

func (*Parser) Init added in v0.0.4

func (parser *Parser) Init()

func (*Parser) Parse added in v0.0.4

func (parser *Parser) Parse(CsvLine string) error

Jump to

Keyboard shortcuts

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