()
| 36 | ) |
| 37 | |
| 38 | func GetColorPatternNames() []string { |
| 39 | |
| 40 | if !colorsCompiled { |
| 41 | CompileColorPatterns() |
| 42 | } |
| 43 | |
| 44 | ret := []string{} |
| 45 | |
| 46 | for name := range numericPatterns { |
| 47 | ret = append(ret, name) |
| 48 | } |
| 49 | |
| 50 | sort.Slice(ret, func(i, j int) bool { return ret[i] < ret[j] }) |
| 51 | |
| 52 | return ret |
| 53 | } |
| 54 | |
| 55 | func ApplyColorPattern(input string, pattern string, method ...ColorizeStyle) string { |
| 56 | if pattern == `` { |
nothing calls this directly
no test coverage detected