gocsv


CSV reading and writing for Go

Don't Use This Package

A csv package has been added to the Go standard library. It is available already in the weeklys, and should be in the release branch in the near future. It isn't a drop-in replacement, but the API is similar enough that switching over if you're already using gocsv should be really easy. I'll keep this project up for another few months, then it will go away.


Reasonably efficient and robust CSV reading and writing library. There is support for different field delimiters and space-eating settings. Feel free to file an issue if you'd like a particular behavior implemented.

gocsv can be installed with goinstall gocsv.googlecode.com/hg.

For API documentation, see the GodocOutput.

Example:

``` package main

// Reads CSV from stdin and dumps it back to stdout.

import ( "gocsv.googlecode.com/hg" "os" )

func main() { rows, err := csv.ReadAll(os.Stdin) if err != nil { panic(err.String()) } csv.WriteAll(os.Stdout, rows) } ```

Project Information