isExtendedTchar checks if c is a valid token character as defined in the spec.
(c byte)
| 8 | |
| 9 | // isExtendedTchar checks if c is a valid token character as defined in the spec. |
| 10 | func isExtendedTchar(c byte) bool { |
| 11 | if isAlpha(c) || isDigit(c) { |
| 12 | return true |
| 13 | } |
| 14 | |
| 15 | switch c { |
| 16 | case '!', '#', '$', '%', '&', '\'', '*', '+', '-', '.', '^', '_', '`', '|', '~', ':', '/': |
| 17 | return true |
| 18 | } |
| 19 | |
| 20 | return false |
| 21 | } |
| 22 | |
| 23 | // ErrInvalidTokenFormat is returned when a token format is invalid. |
| 24 | var ErrInvalidTokenFormat = errors.New("invalid token format") |
no test coverage detected
searching dependent graphs…