(s []byte)
| 1226 | } |
| 1227 | |
| 1228 | func isName(s []byte) bool { |
| 1229 | if len(s) == 0 { |
| 1230 | return false |
| 1231 | } |
| 1232 | c, n := utf8.DecodeRune(s) |
| 1233 | if c == utf8.RuneError && n == 1 { |
| 1234 | return false |
| 1235 | } |
| 1236 | if !unicode.Is(first, c) { |
| 1237 | return false |
| 1238 | } |
| 1239 | for n < len(s) { |
| 1240 | s = s[n:] |
| 1241 | c, n = utf8.DecodeRune(s) |
| 1242 | if c == utf8.RuneError && n == 1 { |
| 1243 | return false |
| 1244 | } |
| 1245 | if !unicode.Is(first, c) && !unicode.Is(second, c) { |
| 1246 | return false |
| 1247 | } |
| 1248 | } |
| 1249 | return true |
| 1250 | } |
| 1251 | |
| 1252 | func isNameString(s string) bool { |
| 1253 | if len(s) == 0 { |
no outgoing calls
no test coverage detected