csvfile

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package csvfile reads the semicolon-separated files upstream sources publish, record by record, after checking their header. Its errors never quote a value of the file: it may hold personal data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads the records of a file after its header.

func Open

func Open(r io.Reader, want []string, errFormat error) (*Reader, error)

Open checks that the semicolon-separated r starts with the header want and returns a reader of the records after it. A departure from the format is reported with errFormat, the source's own error.

func (*Reader) Each

func (r *Reader) Each(add func(rec []string) error) error

Each calls add with every record, which add must not keep: the next one reuses it. It stops at the first error, located by line.

Jump to

Keyboard shortcuts

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