Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
5f49a09ab4 | |||
42ccf3c812 | |||
2fa6aef836 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*.zip
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
46
answer.txt
46
answer.txt
@@ -1,46 +0,0 @@
|
||||
UPC
|
||||
200033148770
|
||||
200042041350
|
||||
200042041400
|
||||
200042064910
|
||||
200047796200
|
||||
200059594110
|
||||
200059660970
|
||||
200065290180
|
||||
200065290220
|
||||
200065290310
|
||||
200065290340
|
||||
200065290370
|
||||
200066707320
|
||||
200069556670
|
||||
200072791220
|
||||
0075849385857
|
||||
200072791320
|
||||
200072791380
|
||||
200072791470
|
||||
200072950140
|
||||
200079186270
|
||||
200079343740
|
||||
200081451640
|
||||
200081630310
|
||||
200106953220
|
||||
200156488680
|
||||
200157056340
|
||||
200168095820
|
||||
200168979440
|
||||
200172490020
|
||||
200177334550
|
||||
200177780700
|
||||
200177788230
|
||||
327582805540
|
||||
337582889920
|
||||
357582840140
|
||||
357582843530
|
||||
357582850030
|
||||
477039522210
|
||||
477039522200
|
||||
482000077030
|
||||
482000077040
|
||||
482000077090
|
||||
647582802920
|
||||
647582804700
|
7
main.go
7
main.go
@@ -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),
|
||||
|
Reference in New Issue
Block a user