(options InstallOptions, id string, version string)
| 308 | } |
| 309 | |
| 310 | func 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 | |
| 318 | func readTargetLibrary(reader *zip.Reader, id string, version string, goos string) ([]byte, os.FileMode, error) { |
| 319 | targetName := strings.TrimSpace(id) + pluginExtension(goos) |
no test coverage detected