csv

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach(file string, opts *Opts, cb func(Row) error)

ForEach will loop through each row of a CSV.

func Line

func Line(args ...string) ([]byte, error)

Line will generate a CSV encoded row/line.

func PrintLine

func PrintLine(args ...string)

PrintLine will generate a CSV encoded row/line and print to stdout.

Types

type Opts

type Opts struct {
	Headers      []string
	Header       bool
	ColSep       rune
	LazyQuotes   bool
	ReuseRecord  bool
	PanicOnError bool
	PrintOnError bool
}

Opts is options.

type Row

type Row struct {
	Headers []string
	Data    map[string]string
}

Row wraps the row's data and meta data.

Jump to

Keyboard shortcuts

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