ent

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVAttr

type CSVAttr struct {
	// Headers contains names of fields to be placed to CSV file during
	// creation of DwC Archive.
	Headers []string

	// Path is the path to the CSV file.
	Path string

	// ColSep is the UTF-8 character used to separate fields from each other.
	ColSep rune

	// Quote (usually `"`) that escapes ColSep characters withing the fields.
	Quote string

	// IgnoreHeader indicates if there is a header row in the CSV file.
	// If header exists, its values will be ignored.
	IgnoreHeader string

	// BadRowProcessing determines a method for dealing with rows that have
	// wrong number of elements. The 'bad rows' would either be processed,
	// ignored, of break the execution of the program. Default is to raise an
	// error.
	BadRowProcessing gnfmt.BadRow
}

CSVAttr describes a variety of configuration attributes for reading and writing CSV files.

type CSVReader

type CSVReader interface {
	ReadSlice(offset, limit int) ([][]string, error)
	Read(context.Context, chan<- []string) (int, error)
	Close() error
}

type CSVWriter

type CSVWriter interface {
	Write(ctx context.Context, ch <-chan []string) error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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