Skip to content

Commit 9ecd7dd

Browse files
author
Mattia Bertorello
committed
Changed name of GetRelease to FindReleaseWith*
1 parent 1da1d44 commit 9ecd7dd

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Diff for: arduino/cores/cores.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/arduino/go-paths-helper"
2424

2525
"github.com/arduino/arduino-cli/arduino/resources"
26-
properties "github.com/arduino/go-properties-map"
26+
"github.com/arduino/go-properties-map"
2727
"go.bug.st/relaxed-semver"
2828
)
2929

@@ -111,9 +111,9 @@ func (platform *Platform) GetOrCreateRelease(version *semver.Version) (*Platform
111111
return release, nil
112112
}
113113

114-
// GetReleaseRelaxedVersion returns the specified release corresponding the provided version,
114+
// FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version,
115115
// or nil if not found.
116-
func (platform *Platform) GetReleaseVersion(version *semver.Version) *PlatformRelease {
116+
func (platform *Platform) FindReleaseWithVersion(version *semver.Version) *PlatformRelease {
117117
// use as an fmt.Stringer
118118
return platform.Releases[version.String()]
119119
}
@@ -125,7 +125,7 @@ func (platform *Platform) GetLatestRelease() *PlatformRelease {
125125
if latestVersion == nil {
126126
return nil
127127
}
128-
return platform.GetReleaseVersion(latestVersion)
128+
return platform.FindReleaseWithVersion(latestVersion)
129129
}
130130

131131
// GetAllReleasesVersions returns all the version numbers in this Platform Package.

Diff for: arduino/cores/packagemanager/download.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (pm *PackageManager) FindPlatformReleaseDependencies(item *PlatformReferenc
8181

8282
var release *cores.PlatformRelease
8383
if item.PlatformVersion != nil {
84-
release = platform.GetReleaseVersion(item.PlatformVersion)
84+
release = platform.FindReleaseWithVersion(item.PlatformVersion)
8585
if release == nil {
8686
return nil, nil, fmt.Errorf("required version %s not found for platform %s", item.PlatformVersion, platform.String())
8787
}

Diff for: arduino/cores/packagemanager/package_manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (ta *ToolActions) Release(version *semver.RelaxedVersion) *ToolReleaseActio
288288
if ta.forwardError != nil {
289289
return &ToolReleaseActions{forwardError: ta.forwardError}
290290
}
291-
release := ta.tool.GetReleaseRelaxedVersion(version)
291+
release := ta.tool.FindReleaseWithRelaxedVersion(version)
292292
if release == nil {
293293
return &ToolReleaseActions{forwardError: fmt.Errorf("release %s not found for tool %s", version, ta.tool.String())}
294294
}

Diff for: arduino/cores/tools.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ func (tool *Tool) GetOrCreateRelease(version *semver.RelaxedVersion) *ToolReleas
6262
return release
6363
}
6464

65-
// GetReleaseRelaxedVersion returns the specified release corresponding the provided version,
65+
// FindReleaseWithRelaxedVersion returns the specified release corresponding the provided version,
6666
// or nil if not found.
67-
func (tool *Tool) GetReleaseRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease {
67+
func (tool *Tool) FindReleaseWithRelaxedVersion(version *semver.RelaxedVersion) *ToolRelease {
6868
return tool.Releases[version.String()]
6969
}
7070

@@ -86,7 +86,7 @@ func (tool *Tool) LatestRelease() *ToolRelease {
8686
return nil
8787
}
8888

89-
return tool.GetReleaseRelaxedVersion(latest)
89+
return tool.FindReleaseWithRelaxedVersion(latest)
9090
}
9191

9292
// latestReleaseVersion obtains latest version number.

0 commit comments

Comments
 (0)