()
| 313 | } |
| 314 | |
| 315 | func CompileColorPatterns() { |
| 316 | |
| 317 | if colorsCompiled { |
| 318 | return |
| 319 | } |
| 320 | |
| 321 | for name, numbers := range numericPatterns { |
| 322 | cPatterns := []string{} |
| 323 | |
| 324 | for _, num := range numbers { |
| 325 | cPatterns = append(cPatterns, fmt.Sprintf(`{%d}`, num)) |
| 326 | } |
| 327 | ShortTagPatterns[name] = cPatterns |
| 328 | } |
| 329 | |
| 330 | colorsCompiled = true |
| 331 | } |
| 332 | |
| 333 | func IsValidPattern(pName string) bool { |
| 334 | if _, ok := numericPatterns[pName]; ok { |
no outgoing calls
no test coverage detected