GetAllColorPatterns returns a copy of all loaded color patterns (name → ANSI codes).
()
| 10 | |
| 11 | // GetAllColorPatterns returns a copy of all loaded color patterns (name → ANSI codes). |
| 12 | func GetAllColorPatterns() map[string][]int { |
| 13 | result := make(map[string][]int, len(numericPatterns)) |
| 14 | for k, v := range numericPatterns { |
| 15 | cp := make([]int, len(v)) |
| 16 | copy(cp, v) |
| 17 | result[k] = cp |
| 18 | } |
| 19 | return result |
| 20 | } |
| 21 | |
| 22 | // SaveColorPattern adds or replaces a named color pattern in memory and persists the file. |
| 23 | func SaveColorPattern(name string, colors []int) error { |
no outgoing calls
no test coverage detected