Skip to content

Commit 74ae077

Browse files
authored
Merge pull request #284 from sshehata/master
feat: allow missing values when parsing csvs
2 parents a8b69c2 + 0f33e2f commit 74ae077

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

base/csv.go

+5
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ func ParseCSVBuildInstancesFromReader(r io.ReadSeeker, attrs []Attribute, hasHea
187187
}
188188
}
189189
for i, v := range record {
190+
// support missing values
191+
if v == "" {
192+
continue
193+
}
194+
190195
u.Set(specs[i], rowCounter, specs[i].attr.GetSysValFromString(strings.TrimSpace(v)))
191196
}
192197
rowCounter++

0 commit comments

Comments
 (0)