(s string)
| 975 | } |
| 976 | |
| 977 | func isValidTag(s string) bool { |
| 978 | if s == "" { |
| 979 | return false |
| 980 | } |
| 981 | for _, c := range s { |
| 982 | switch { |
| 983 | case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c): |
| 984 | // Backslash and quote chars are reserved, but |
| 985 | // otherwise any punctuation chars are allowed |
| 986 | // in a tag name. |
| 987 | case !unicode.IsLetter(c) && !unicode.IsDigit(c): |
| 988 | return false |
| 989 | } |
| 990 | } |
| 991 | return true |
| 992 | } |
| 993 | |
| 994 | func typeByIndex(t reflect.Type, index []int) reflect.Type { |
| 995 | for _, i := range index { |
no outgoing calls
no test coverage detected
searching dependent graphs…