(input string, patches []Patch)
| 39 | } |
| 40 | |
| 41 | func applyPatches(input string, patches []Patch) string { |
| 42 | for _, patch := range patches { |
| 43 | if patch.Once { |
| 44 | utils.ReplaceOnce(&input, patch.Regex, patch.Replacement) |
| 45 | } else { |
| 46 | utils.Replace(&input, patch.Regex, patch.Replacement) |
| 47 | } |
| 48 | } |
| 49 | return input |
| 50 | } |
| 51 | |
| 52 | func readRemoteCssMap(tag string, cssTranslationMap *map[string]string) error { |
| 53 | var cssMapURL string = "https://raw.githubusercontent.com/spicetify/cli/" + tag + "/css-map.json" |
no test coverage detected