csv

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package csv implements a type which reads csv quote data and returns quotes one by one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Quoter

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

Quoter provides access to price data in csv format.

func NewQuoter

func NewQuoter(r io.Reader) *Quoter

NewQuoter returns a quote reader using the default parseLine `parseQuote`.

func (*Quoter) NextQuote

func (qr *Quoter) NextQuote() (q forex.Quote, err error)

NextQuote returns the next quote from the data source.

func (*Quoter) SetParser

func (qr *Quoter) SetParser(f func([]string) (forex.Quote, error))

SetParser sets the parseLine to use to parse the fields of the csv file. By default, parseQuote is used.

Jump to

Keyboard shortcuts

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