diff --git a/pkg/istr/checker.go b/pkg/istr/checker.go index 60ada4d9..5cdc60ea 100644 --- a/pkg/istr/checker.go +++ b/pkg/istr/checker.go @@ -2,6 +2,7 @@ package istr import ( "strings" + "strconv" ) func SampleKeyInvalid(str string) bool { @@ -13,5 +14,11 @@ func SampleKeyInvalid(str string) bool { r == ' ' || r == '=' }) - return idx != -1 + + if idx != -1 { + return true + } + + _, err := strconv.ParseFloat(str, 64) + return err == nil }