(sources ...map[string]string)
| 175 | } |
| 176 | |
| 177 | func normalizeDesiredPluginVersions(sources ...map[string]string) map[string]string { |
| 178 | out := make(map[string]string) |
| 179 | for _, source := range sources { |
| 180 | for id, version := range source { |
| 181 | id = strings.TrimSpace(id) |
| 182 | version = normalizePluginDesiredVersion(version) |
| 183 | if id == "" || version == "" { |
| 184 | continue |
| 185 | } |
| 186 | out[id] = version |
| 187 | } |
| 188 | } |
| 189 | return out |
| 190 | } |
| 191 | |
| 192 | func pluginFilePreferredForDesired(candidate pluginFile, current pluginFile, desiredVersion string) bool { |
| 193 | desiredVersion = normalizePluginDesiredVersion(desiredVersion) |
no test coverage detected