Reincluding Numbers
This commit is contained in:
parent
73fb9ea36e
commit
c79fd5c168
@ -321,7 +321,7 @@ func isValidPart(kind partKind, s string) bool {
|
|||||||
}
|
}
|
||||||
for i, c := range s {
|
for i, c := range s {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
if !isLetterorUnderscore(c) {
|
if !isAlphanumericOrUnderscore(c) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
@ -337,7 +337,7 @@ func isValidPart(kind partKind, s string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
if !isLetterorUnderscore(c) {
|
if !isAlphanumericOrUnderscore(c) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -345,8 +345,8 @@ func isValidPart(kind partKind, s string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func isLetterorUnderscore(c rune) bool {
|
func isAlphanumericOrUnderscore(c rune) bool {
|
||||||
return unicode.IsLetter(c) || c == '_'
|
return unicode.IsLetter(c) || unicode.IsDigit(c) || c == '_'
|
||||||
}
|
}
|
||||||
|
|
||||||
func cutLast(s, sep string) (before, after string, ok bool) {
|
func cutLast(s, sep string) (before, after string, ok bool) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user