# README
CSV
Package CSV is a package to parse a full csv reader inside a slice structure. Allow to configure a decoder to transform directly csv entries into csv structure.
I had this specific need because i would to parse many csv files for differents type structure.
This package allow to configure dynamicly the structure builder to parse each entries files.
If you need an easy parser to decode csv file basicly, prefer use the csvutil package
Install
$> go get github.com/gofast-pkg/csv@latest
Usage
import github.com/gofast-pkg/csv
func main() {
reader, err := os.Open(filePath)
if err != nil {
panic(err)
}
defer reader.Close()
csvReader, err := csv.New(reader, ';')
if err != nil {
panic(err)
}
}
Examples are provided on the go doc reference
Contributing
:grey_exclamation: Use issues for everything
Read more informations with the CONTRIBUTING_GUIDE
For all changes, please update the CHANGELOG.txt file by replacing the existant content.
Thank you :pray: :+1:
Made with contrib.rocks.
Licence
# Functions
New create a new CSV reader from io.Reader.
NewDecoder returns a new decoder with the configuration passed as parameter.
NewWarning return a new warning For read a warning it's possible to iterate over it like a map.
# Constants
ExtensionFile for the csv file type.
# Variables
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
error for the csv parser.
# Structs
ConfigDecoder is the struct that contains the configuration to create a new decoder.
# Type aliases
Warning collect relevants informations about the process on the csv file.