Closed joeberth closed 4 years ago
Error when using the csv employee, the schema and trying to use the function CastTable(tab table.Table, out interface{}). References the out argument of this function to this struct
Using this function produces following error: "strconv.ParseInt: parsing " 2020": invalid syntax"
Which is strange, because when adding the test case directly to the integer_test.go of the tableschema-go, it does not produce an error.
This error is fixed when i delete white spaces before call CastTable.
@danielfireman
HI @joeberth, thanks for reporting!
The library behavior is correct. If you would like to strip the prefixed whitespaces you need to set bareNumber: false in the schema field. The behavior is documented here and implemented here.
bareNumber: false
Overview
Error when using the csv employee, the schema and trying to use the function CastTable(tab table.Table, out interface{}). References the out argument of this function to this struct
Using this function produces following error: "strconv.ParseInt: parsing " 2020": invalid syntax"
Which is strange, because when adding the test case directly to the integer_test.go of the tableschema-go, it does not produce an error.
This error is fixed when i delete white spaces before call CastTable.
@danielfireman