csv

package
v0.0.0-...-62f53a0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Standardne pouzivame ako oddelovat ";"
	Comma = ';'

	// Maximum Excel rows..
	MaxWrite = 500000
)

Variables

This section is empty.

Functions

func ParsePath

func ParsePath(path string, n, m int) ([]engine.Kombinacia, error)

func SetHeader

func SetHeader(header []string) func(w *CsvMaxWriter)

func SetHeaders

func SetHeaders(headers [][]string) func(w *CsvMaxWriter)

func SetSubdir

func SetSubdir(subdir string) func(w *CsvMaxWriter)

func SetSuffixFunc

func SetSuffixFunc(sf SuffixFunc) func(w *CsvMaxWriter)

Types

type CsvMaxWriter

type CsvMaxWriter struct {

	// suffix suboru
	Suffix SuffixFunc
	// contains filtered or unexported fields
}

func NewCsvMaxWriter

func NewCsvMaxWriter(fileName, workingDir string, options ...func(*CsvMaxWriter)) *CsvMaxWriter

func (*CsvMaxWriter) Close

func (w *CsvMaxWriter) Close() error

Close zatvori subor a zapise vsetky data v buffer

func (*CsvMaxWriter) TotalRowsWriten

func (w *CsvMaxWriter) TotalRowsWriten() int

TotalRowsWriten vrati pocet zapisanych riadkov

func (*CsvMaxWriter) Write

func (w *CsvMaxWriter) Write(record []string) error

Write zapise retazce record do suboru

type Parser

type Parser struct {
	SkipHeader bool
	// contains filtered or unexported fields
}

func NewParser

func NewParser(r io.Reader, n, m int) *Parser

func (*Parser) Parse

func (p *Parser) Parse() ([]engine.Kombinacia, error)

type Reader

type Reader struct {
	*csv.Reader
}

func NewReader

func NewReader(r io.Reader) *Reader

type SuffixFunc

type SuffixFunc func() string

func DefaultSuffix

func DefaultSuffix(workingDir string) SuffixFunc

func EmptySuffix

func EmptySuffix() SuffixFunc

func IntSuffix

func IntSuffix() SuffixFunc

Jump to

Keyboard shortcuts

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