MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / normalizeDesiredPluginVersions

Function normalizeDesiredPluginVersions

internal/pluginhost/platform.go:177–190  ·  view source on GitHub ↗
(sources ...map[string]string)

Source from the content-addressed store, hash-verified

175}
176
177func 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
192func pluginFilePreferredForDesired(candidate pluginFile, current pluginFile, desiredVersion string) bool {
193 desiredVersion = normalizePluginDesiredVersion(desiredVersion)

Callers 1

Calls 1

Tested by

no test coverage detected