csvio

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package csvio owns streamio's CSV and TSV support: one package for both, since they differ only in field delimiter.

A CSV field has no type of its own, so every decoded field is record.KindBytes rather than sniffed as a number or bool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDecoder

func NewDecoder(cfg options.Config, src options.Source) (formatio.RecordDecoder, error)

NewDecoder opens src as a stream of canonical records. NewDecoder does not take ownership of src.Reader; the caller closes it, if it needs closing, once done with every decoder Split hands out.

func NewEncoder

func NewEncoder(cfg options.Config) (formatio.RecordEncoder, error)

NewEncoder returns an encoder rendering a batch of canonical records as one CSV/TSV document. SingleFileOutput selects the streaming encoder below instead: see NewStreamingEncoder.

func NewRawSource

func NewRawSource(cfg options.Config, src options.Source) (formatio.RawSource, error)

NewRawSource opens src for raw passthrough: each dispatched document is one row's raw bytes. NewRawSource does not take ownership of src.Reader; the caller closes it, if it needs closing, once done with the returned source.

func NewStreamingEncoder

func NewStreamingEncoder(cfg options.Config) (formatio.RecordEncoder, error)

NewStreamingEncoder returns a formatio.FinalizableRecordEncoder producing one continuous CSV/TSV document across every batch in the run.

Types

This section is empty.

Jump to

Keyboard shortcuts

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