Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1006 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 1006 Bytes

bettercsv Build Status

A drop in replacement for the stdlib csv implementation for golang, to make it support any dsv. Fully backward compatible while providing more features.

Forked from the 'encoding/csv' golang(1.3.3) csv implementation.

Usage

In addition to encoding/csv functionality, you can specify custom quoting characters for reading and writing.

Example

fileReader, _ = os.Open("/tmp/wierd_dsv.txt")
csvReader := bettercsv.NewReader(fileReader)
csvReader.Comma = ';'
csvReader.Quote = '|'
content := csvReader.ReadAll()

Install

go get github.com/tinygrasshopper/bettercsv

Goals

  • Custom quote rune while reading
  • Custom quote rune while writing
  • Support no quoting charater while writing
  • Supporting headers
  • Reading to a map