csv

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package csv is a wrapper around the stdlib csv library that provides a nice API for the GTFS static parser.

Because, of course, everything can be solved with another layer of indirection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

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

func New

func New(reader io.Reader) (*File, error)

func (*File) Iter

func (p *File) Iter() *Iterator

type Iterator

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

func (*Iterator) Get

func (i *Iterator) Get() *Row

func (*Iterator) Next

func (i *Iterator) Next() bool

type Row

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

func (*Row) Get

func (r *Row) Get(key string) string

func (*Row) GetOptional

func (r *Row) GetOptional(key string) *string

func (*Row) GetOr

func (r *Row) GetOr(key string, fallback string) string

func (*Row) GetOrCalculate

func (r *Row) GetOrCalculate(key string, f func() string) string

func (Row) MissingKeys

func (r Row) MissingKeys() []string

Jump to

Keyboard shortcuts

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