check tag key
This commit is contained in:
parent
88e6e4bf56
commit
b65c8f696b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue