fixed bug where real numbers crashed app
This commit is contained in:
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
|
||||
}
|
Reference in New Issue
Block a user