murex: github.com/lmorg/murex/builtins/types/csv Index | Files

package csv

import "github.com/lmorg/murex/builtins/types/csv"

Package csv provides definitions for the `csv` data type

Index

Package Files

csv.go godoc.go index.go init.go map.go marshal.go

type Parser Uses

type Parser struct {
    Separator byte
    Quote     byte
    Comment   byte
    Headings  bool
    // contains filtered or unexported fields
}

Parser is the CSV parser settings

func NewParser Uses

func NewParser(reader io.Reader, config *config.Config) (parser *Parser, err error)

NewParser creates a new CSV reader and writer - albeit it doesn't conform to Go's io.Reader / io.Writer interface{}. The sensible thing might have been to create this as a marshaller but it's written now and works so little point breaking it at this point in time.

func (*Parser) ArrayToCsv Uses

func (parser *Parser) ArrayToCsv(array []string) (csv []byte)

ArrayToCsv marshals a list into a CSV line

func (*Parser) ReadLine Uses

func (parser *Parser) ReadLine(callback func(records []string, headings []string)) (err error)

ReadLine - read a line from a CSV file

Package csv imports 16 packages (graph) and is imported by 1 packages. Updated 2019-07-21. Refresh now. Tools for package owners.