csv

package
v0.0.0-...-2413726 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitiailzedWriter

func InitiailzedWriter(config Config) (store.Writer, error)

InitiailzedWriter returns a Initiailzed CSV writer

func Reader

func Reader(cfg Config) store.Reader

Reader returns a CSV file reader

func Writer

func Writer(config Config) store.Writer

Writer returns a CSV writer

Types

type Config

type Config struct {
	// Path CSV file path
	Path string
	// Comma is the field delimiter.
	Comma rune
	// Comment character without preceding whitespace are ignored.
	// With leading whitespace the Comment character becomes part of the
	// field, even if TrimLeadingSpace is true.
	Comment rune
	// If TrimLeadingSpace is true, leading white space in a field is ignored.
	// This is done even if the field delimiter, Comma, is white space.
	TrimLeadingSpace bool
	//HasHeader is CSV has a header? default value is true
	HasHeader bool
	//CSV headers; If blank will be populated automatically, by reading CSV or Row
	Header []string
}

Config is a struct to hold all csv configuration

func NewConfig

func NewConfig() *Config

NewConfig is a function to create configuration object

Jump to

Keyboard shortcuts

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