go-text: github.com/mithrandie/go-text/csv Index | Files

package csv

import "github.com/mithrandie/go-text/csv"

Package csv is a Go library to read and write CSV format.

Index

Package Files

main.go reader.go types.go writer.go

Constants

const QuotationMark = 0x22

type Field Uses

type Field struct {
    Contents string
    Quote    bool
}

func NewField Uses

func NewField(contents string, quote bool) Field

type Reader Uses

type Reader struct {
    Delimiter   rune
    WithoutNull bool
    Encoding    text.Encoding

    FieldsPerRecord int

    DetectedLineBreak text.LineBreak
    EnclosedAll       bool
    // contains filtered or unexported fields
}

func NewReader Uses

func NewReader(r io.Reader, enc text.Encoding) (*Reader, error)

func (*Reader) Read Uses

func (r *Reader) Read() ([]text.RawText, error)

func (*Reader) ReadAll Uses

func (r *Reader) ReadAll() ([][]text.RawText, error)

func (*Reader) ReadHeader Uses

func (r *Reader) ReadHeader() ([]string, error)

type Writer Uses

type Writer struct {
    Delimiter rune
    // contains filtered or unexported fields
}

func NewWriter Uses

func NewWriter(w io.Writer, lineBreak text.LineBreak, enc text.Encoding) (*Writer, error)

func (*Writer) Flush Uses

func (e *Writer) Flush() error

func (*Writer) Write Uses

func (e *Writer) Write(record []Field) error

Package csv imports 7 packages (graph) and is imported by 1 packages. Updated 2019-10-25. Refresh now. Tools for package owners.