gocarina / gocsv

The GoCSV package aims to provide easy CSV serialization and deserialization to the golang programming language
MIT License
1.99k stars 245 forks source link

rune parsed as integer #269

Open aviplot opened 10 months ago

aviplot commented 10 months ago

If a struct has a rune type, the conversion is failed with strconv.ParseInt (Probably correct). Since there are no differences, a rune can be considered as an int. I have no suggestion on how to solve that... Code example:

type Node struct {
    NIndex  Nindex `csv:"NINDEX"`
    NType   rune   `csv:"NTYPE"`
    NInfo   Ninfo  `csv:"NINFO"`
}

and the input contains a letter, lets say a.

Thanks!