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

Function installTargetPath

internal/pluginstore/install.go:310–316  ·  view source on GitHub ↗
(options InstallOptions, id string, version string)

Source from the content-addressed store, hash-verified

308}
309
310func installTargetPath(options InstallOptions, id string, version string) (string, error) {
311 version = normalizeVersion(version)
312 if !validPluginVersion(version) {
313 return "", fmt.Errorf("invalid plugin version %q", version)
314 }
315 return filepath.Join(options.PluginsDir, options.GOOS, options.GOARCH, versionedPluginFileName(id, version, options.GOOS)), nil
316}
317
318func readTargetLibrary(reader *zip.Reader, id string, version string, goos string) ([]byte, os.FileMode, error) {
319 targetName := strings.TrimSpace(id) + pluginExtension(goos)

Callers 1

InstallArchiveFunction · 0.85

Calls 3

normalizeVersionFunction · 0.85
versionedPluginFileNameFunction · 0.85
validPluginVersionFunction · 0.70

Tested by

no test coverage detected