isID reports if the given string is an unnamed identifier.
(s string)
| 480 | |
| 481 | // isID reports if the given string is an unnamed identifier. |
| 482 | func isID(s string) bool { |
| 483 | for _, r := range s { |
| 484 | if !strings.ContainsRune("0123456789", r) { |
| 485 | return false |
| 486 | } |
| 487 | } |
| 488 | return true |
| 489 | } |
| 490 | |
| 491 | // ident returns a sanitized version of the given identifier. |
| 492 | func ident(s string) *ast.Ident { |
no outgoing calls
no test coverage detected