Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
2fa6aef836 | |||
25a7658328 | |||
41f592ec45 | |||
ece15459ed |
@ -14,32 +14,33 @@ UPC
|
|||||||
2.0006670732e+11
|
2.0006670732e+11
|
||||||
2.0006955667e+11
|
2.0006955667e+11
|
||||||
2.0007279122e+11
|
2.0007279122e+11
|
||||||
|
0075849385857
|
||||||
2.0007279132e+11
|
2.0007279132e+11
|
||||||
2.0007279138e+11
|
2.0007279138E+11
|
||||||
2.0007279147e+11
|
2.0007279147E+11
|
||||||
2.0007295014e+11
|
2.0007295014E+11
|
||||||
2.0007918627e+11
|
2.0007918627E+11
|
||||||
2.0007934374e+11
|
2.0007934374E+11
|
||||||
2.0008145164e+11
|
2.0008145164E+11
|
||||||
2.0008163031e+11
|
2.0008163031E+11
|
||||||
2.0010695322e+11
|
2.0010695322E+11
|
||||||
2.0015648868e+11
|
2.0015648868E+11
|
||||||
2.0015705634e+11
|
2.0015705634E+11
|
||||||
2.0016809582e+11
|
2.0016809582E+11
|
||||||
2.0016897944e+11
|
2.0016897944E+11
|
||||||
2.0017249002e+11
|
2.0017249002E+11
|
||||||
2.0017733455e+11
|
2.0017733455E+11
|
||||||
2.001777807e+11
|
2.001777807E+11
|
||||||
2.0017778823e+11
|
2.0017778823E+11
|
||||||
3.2758280554e+11
|
3.2758280554E+11
|
||||||
3.3758288992e+11
|
3.3758288992E+11
|
||||||
3.5758284014e+11
|
3.5758284014E+11
|
||||||
3.5758284353e+11
|
3.5758284353E+11
|
||||||
3.5758285003e+11
|
3.5758285003E+11
|
||||||
4.7703952221e+11
|
4.7703952221E+11
|
||||||
4.770395222e+11
|
4.770395222E+11
|
||||||
4.8200007703e+11
|
4.8200007703E+11
|
||||||
4.8200007704e+11
|
4.8200007704E+11
|
||||||
4.8200007709e+11
|
4.8200007709E+11
|
||||||
6.4758280292e+11
|
6.4758280292E+11
|
||||||
6.475828047e+11
|
6.475828047E+11
|
||||||
|
10
isNumeric.go
Normal file
10
isNumeric.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"regexp"
|
||||||
|
)
|
||||||
|
|
||||||
|
func isNumeric(s string) bool {
|
||||||
|
match, _ := regexp.MatchString("^[0-9]+$", s)
|
||||||
|
return match
|
||||||
|
}
|
7
main.go
7
main.go
@ -78,6 +78,13 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isNumeric(upc) == true {
|
||||||
|
gtins = append(gtins, upc)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lower case the E
|
||||||
|
upc = strings.ToLower(upc)
|
||||||
// Split scientific notation at the e+ point
|
// Split scientific notation at the e+ point
|
||||||
upcArray := strings.Split(upc, "e+")
|
upcArray := strings.Split(upc, "e+")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user