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

Function ReleaseVersion

internal/pluginstore/github.go:108–114  ·  view source on GitHub ↗

ReleaseVersion derives the plugin version from the release tag, stripping a leading "v"/"V" and validating the result.

(release Release)

Source from the content-addressed store, hash-verified

106// ReleaseVersion derives the plugin version from the release tag, stripping a
107// leading "v"/"V" and validating the result.
108func ReleaseVersion(release Release) (string, error) {
109 version := normalizeVersion(release.TagName)
110 if !validPluginVersion(version) {
111 return "", fmt.Errorf("invalid release tag %q", release.TagName)
112 }
113 return version, nil
114}
115
116func (c Client) DownloadAsset(ctx context.Context, asset ReleaseAsset) ([]byte, error) {
117 downloadURL := strings.TrimSpace(asset.BrowserDownloadURL)

Callers 6

latestPluginVersionMethod · 0.92
TestReleaseVersionFunction · 0.70
InstallMethod · 0.70
InstallVersionMethod · 0.70
ManifestFromReleaseFunction · 0.70
ValidateMethod · 0.70

Calls 2

normalizeVersionFunction · 0.85
validPluginVersionFunction · 0.70

Tested by 1

TestReleaseVersionFunction · 0.56