fixed bug where empty line would crash program

This commit is contained in:
2025-08-13 09:14:42 -04:00
parent 2fa6aef836
commit 42ccf3c812

View File

@@ -71,6 +71,7 @@ func main() {
}))
for _, upc := range upcs {
if len(upc) > 0 {
checkForNonStartingNumber := regex.MatchString(upc)
if checkForNonStartingNumber {
@@ -78,7 +79,7 @@ func main() {
continue
}
if isNumeric(upc) == true {
if isNumeric(upc) {
gtins = append(gtins, upc)
continue
}
@@ -111,6 +112,10 @@ func main() {
gtins = append(gtins, upc)
checkBar.Add(1)
} else {
gtins = append(gtins, "")
checkBar.Add(1)
}
}
answerBar := progressbar.NewOptions(len(gtins),