CSV Simple Reader
- The first line must be a header
- Al last two columns
- At last three rows (required to determinate the delimiter)
- Read CSV/TSV files automatically (support delimiter ",", ";", "\t")
- Don't require an deterministic struct to read
- Headers []string
- Rows map[int]map[string]string
go get github.com/jonathanhecl/csvreader
import (
"github.com/jonathanhecl/csvreader"
)
func main() {
data, err := csvreader.LoadFileCSV("example.csv")
// ...
data2, err := csvreader.ReadCSV("ID,Name,Extra\n1,Test,2\n2,Another,more\n3,Newest,\n4,Another 2,more data")
// ...
}