// readCsv Reads a CSV file, returning a list of map[string]string objects
readCsv Reads a CSV file, returning a list of map[string]string objects
// readCsv Reads a CSV file returning a list of map [ string ] string objects
func readCsvWithHeaders(file string, headers []string) []map[string]string {
	input, err := os.Open(file)
	util.ExitIfError(err, fmt.Sprintf("Error opening file %s", file))
	r := csv.NewReader(input)
	var all []map[string]string
	for {
		record, err := r.Read()
		if err == io.EOF {
			break
		}
		util.ExitIfError(err, fmt.Sprintf("Error processing csv file %s: %s", file, err))
		all = append(all, toMap(headers, record))
	}
	return all
}
func readCsvWithHeaders ( file string , headers [ ] string ) [ ] map [ string ] string { input , err := os . Open ( file ) util . ExitIfError ( err , fmt . Sprintf ( " " , file ) ) r := csv . NewReader ( input ) var all [ ] map [ string ] string for { record , err := r . Read ( ) if err == io . EOF { break } util . ExitIfError ( err , fmt . Sprintf ( " " , file , err ) ) all = append ( all , toMap ( headers , record ) ) } return all }
readCsv Reads a CSV file, returning a list of map[string]string objects
readCsv Reads a CSV file returning a list of map [ string ] string objects