Commit 939029ef authored by Mattia Bertorello's avatar Mattia Bertorello

Changed name of GetRelease to FindReleaseWith*

parent ab16a2b2
......@@ -23,7 +23,7 @@ import (
"github.com/arduino/go-paths-helper"
"github.com/arduino/arduino-cli/arduino/resources"
properties "github.com/arduino/go-properties-map"
"github.com/arduino/go-properties-map"
"go.bug.st/relaxed-semver"
)
......@@ -111,9 +111,9 @@ func (platform *Platform) GetOrCreateRelease(version *semver.Version) (*Platform
return release, nil
}
// GetReleaseRelaxedVersion returns the specified release corresponding the provided version,
// FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version,
// or nil if not found.
func (platform *Platform) GetReleaseVersion(version *semver.Version) *PlatformRelease {
func (platform *Platform) FindReleaseWithVersion(version *semver.Version) *PlatformRelease {
// use as an fmt.Stringer
return platform.Releases[version.String()]
}
......@@ -125,7 +125,7 @@ func (platform *Platform) GetLatestRelease() *PlatformRelease {
if latestVersion == nil {
return nil
}
return platform.GetReleaseVersion(latestVersion)
return platform.FindReleaseWithVersion(latestVersion)
}
// GetAllReleasesVersions returns all the version numbers in this Platform Package.
......
......@@ -81,7 +81,7 @@ func (pm *PackageManager) FindPlatformReleaseDependencies(item *PlatformReferenc
var release *cores.PlatformRelease
if item.PlatformVersion != nil {
release = platform.GetReleaseVersion(item.PlatformVersion)
release = platform.FindReleaseWithVersion(item.PlatformVersion)
if release == nil {
return nil, nil, fmt.Errorf("required version %s not found for platform %s", item.PlatformVersion, platform.String())
}
......
......@@ -288,7 +288,7 @@ func (ta *ToolActions) Release(version *semver.RelaxedVersion) *ToolReleaseActio
if ta.forwardError != nil {
return &ToolReleaseActions{forwardError: ta.forwardError}
}
release := ta.tool.GetReleaseRelaxedVersion(version)
release := ta.tool.FindReleaseWithRelaxedVersion(version)
if release == nil {
return &ToolReleaseActions{forwardError: fmt.Errorf("release %s not found for tool %s", version, ta.tool.String())}
}
......
......@@ -62,9 +62,9 @@ func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolReleas
return release
}
// GetReleaseRelaxedVersion returns the specified release corresponding the provided version,
// FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version,
// or nil if not found.
func (tool *Tool) GetReleaseRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease {
func (tool *Tool) FindReleaseWithRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease {
return tool.Releases[version.String()]
}
......@@ -86,7 +86,7 @@ func (tool *Tool) LatestRelease() *ToolRelease {
return nil
}
return tool.GetReleaseRelaxedVersion(latest)
return tool.FindReleaseWithRelaxedVersion(latest)
}
// latestReleaseVersion obtains latest version number.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment