Skip to content
/ mapcsv Public

go's csv wrapper that returns map instead of array of array of string

License

Notifications You must be signed in to change notification settings

rexk/mapcsv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAPCSV

Simple encoding/csv wrapper that returns map[string]string as a result rather than []string

Install

go get install github.com/rexk/mapcsv

Usuage

package main

import (
  "gihtub.com/rexk/mapcsv"
  "encoding/csv"
  "os"
  "fmt"
)

func main() {
  file, err := os.Open("file.csv")
  if err != nil {
    panic(err)
  }

  r := mapcsv.NewReader(csv.NewReader(file))
  records, err := r.ReadAll()
  if err != nil {
    panic(err)
  }

  fmt.Println(records)
}

About

go's csv wrapper that returns map instead of array of array of string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages