tsv

package module
v0.0.0-...-c3d4270 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(r io.Reader) ([]map[string]string, error)

Decode reads the values from the TSV encoded data provided by the reader.

Types

type Reader

type Reader struct {
	// Null is the value denoting an empty column.
	// It is set to \N by NewReader.
	Null []byte

	// Tab is the tab character used to denote a column boundary.
	Tab []byte
	// contains filtered or unexported fields
}

Reader reads records from a tsv file. Must be created by NewReader, but properties can be set before use.

func NewReader

func NewReader(r io.Reader) *Reader

NewReader creates a new Reader.

func (*Reader) ReadRow

func (r *Reader) ReadRow() ([][]byte, error)

ReadRow extracts a single row from the tsv file, returning nil, io.EOF if no more records are available. The underlying arrays returned will be invalidated on subsequent calls to ReadRow.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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