gocsv.go Simple csv parsing with GO

Recently I was working with csv files in Ruby. Parsing csv files in Ruby code is easy, thanks to Ruby/csv.

Lets try it with golang.

Go seems to be pretty power-packed language for developers. Go, also commonly referred to as golang, is a programming language initially developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. And since its from Google, the big giant, Go has built in support for concurrency with go-routines, channels and select.

Lets get to work now.

Here is a sample csv file for tests.
Output:

Advertisements