csvimport

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package csvimport provides tools to parse CSV data into Protobuf quotes. Each quote is a marker state for a given date.

Index

Constants

This section is empty.

Variables

View Source
var ErrImport = errors.New("import fail")

ErrImport means there was an error in importing CSV data.

Functions

func Import

func Import(r *csv.Reader, opts ...Opt) ([]*pb.Quote, error)

Import parses CSV data into a list of quotes. It returns an error if data parsing fails.

Types

type Opt

type Opt func(*importer)

Opt configures the importer in some way.

func WithScanLines

func WithScanLines(n int) Opt

WithScanLines makes importer scan at most n lines including skipped lines.

func WithSkipLines

func WithSkipLines(n int) Opt

WithSkipLines makes importer skip first n lines.

Directories

Path Synopsis
internal
parser
Package parser can parse CSV records into Protobuf quotes.
Package parser can parse CSV records into Protobuf quotes.
scanner
Package scanner provides tools to access market quotes from CSV data in Protobuf format.
Package scanner provides tools to access market quotes from CSV data in Protobuf format.

Jump to

Keyboard shortcuts

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