kbart

package
v0.1.140 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIncompleteLine     = errors.New("incomplete KBART line")
	ErrIncompleteEmbargo  = errors.New("incomplete embargo")
	ErrInvalidEmbargo     = errors.New("invalid embargo")
	ErrMissingIdentifiers = errors.New("missing identifiers")
)

Functions

This section is empty.

Types

type Reader

type Reader struct {
	SkipFirstRow           bool
	SkipMissingIdentifiers bool
	SkipIncompleteLines    bool
	SkipInvalidEmbargo     bool
	// contains filtered or unexported fields
}

Reader reads tab-separated KBART. The encoding/csv package did not like that particular format so we use a simple bufio.Reader for now.

func NewReader

func NewReader(r io.Reader) *Reader

NewReader creates a new KBART reader.

func (*Reader) Read

func (r *Reader) Read() (columns, holdings.Entry, error)

Read reads a single line. Returns all columns, a parsed entry and error.

func (*Reader) ReadEntries

func (r *Reader) ReadEntries() (holdings.Entries, error)

ReadEntries returns a list of entries.

Jump to

Keyboard shortcuts

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