csv

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDataMustBeSlice     = errors.New("data must be a slice")
	ErrNoDataRowsFound     = errors.New("no data rows found")
	ErrDuplicateColumnName = errors.New("duplicate column name")
	ErrFieldNotSettable    = errors.New("field is not settable")
)

Functions

func NewExporter

func NewExporter(typ reflect.Type, opts ...ExportOption) tabular.Exporter

func NewExporterFor

func NewExporterFor[T any](opts ...ExportOption) tabular.Exporter

func NewImporter

func NewImporter(typ reflect.Type, opts ...ImportOption) tabular.Importer

func NewImporterFor

func NewImporterFor[T any](opts ...ImportOption) tabular.Importer

Types

type ExportOption

type ExportOption func(*exportOptions)

func WithCrlf added in v0.7.0

func WithCrlf() ExportOption

WithCrlf enables Windows-style line endings for compatibility with legacy systems.

func WithExportDelimiter

func WithExportDelimiter(delimiter rune) ExportOption

func WithoutWriteHeader

func WithoutWriteHeader() ExportOption

type ImportOption

type ImportOption func(*importOptions)

func WithComment

func WithComment(comment rune) ImportOption

func WithImportDelimiter

func WithImportDelimiter(delimiter rune) ImportOption

func WithSkipRows

func WithSkipRows(rows int) ImportOption

func WithoutHeader

func WithoutHeader() ImportOption

func WithoutTrimSpace

func WithoutTrimSpace() ImportOption

Jump to

Keyboard shortcuts

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