petit bug sur les lignes de 1 caractère
This commit is contained in:
parent
367bd16e42
commit
1ea2bab9e8
|
@ -108,6 +108,9 @@ func (p *CsvParser) Parse(line string) (map[string]string, error) {
|
||||||
|
|
||||||
// current rune is a delimiter, a value is present and the next char is the next value
|
// current rune is a delimiter, a value is present and the next char is the next value
|
||||||
if isDelimiter || index == maxIndex {
|
if isDelimiter || index == maxIndex {
|
||||||
|
if index == maxIndex && valueStart == -1 {
|
||||||
|
valueStart = 0
|
||||||
|
}
|
||||||
state.delimiter = true
|
state.delimiter = true
|
||||||
field := line[valueStart:index]
|
field := line[valueStart:index]
|
||||||
if state.enclosed {
|
if state.enclosed {
|
||||||
|
|
Loading…
Reference in New Issue