Skip to content

Commit c8e2e6b

Browse files
howjmayMassimiliano Pippi
authored and
Massimiliano Pippi
committed
fix: Fix typo (#562)
1 parent 33b9322 commit c8e2e6b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

arduino/cores/packagemanager/loader.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir
146146
}
147147

148148
for _, file := range files {
149-
architecure := file.Base()
150-
if strings.HasPrefix(architecure, ".") || architecure == "tools" ||
151-
architecure == "platform.txt" { // TODO: Check if this "platform.txt" condition should be here....
149+
architecture := file.Base()
150+
if strings.HasPrefix(architecture, ".") || architecture == "tools" ||
151+
architecture == "platform.txt" { // TODO: Check if this "platform.txt" condition should be here....
152152
continue
153153
}
154-
platformPath := packageDir.Join(architecure)
154+
platformPath := packageDir.Join(architecture)
155155
if !platformPath.IsDir() {
156156
continue
157157
}
@@ -197,16 +197,16 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir
197197
index.MergeIntoPackages(tmp)
198198
if tmpPackage := tmp.GetOrCreatePackage(targetPackage.Name); tmpPackage == nil {
199199
pm.Log.Warnf("Can't determine bundle platform version for %s", targetPackage.Name)
200-
} else if tmpPlatform := tmpPackage.GetOrCreatePlatform(architecure); tmpPlatform == nil {
201-
pm.Log.Warnf("Can't determine bundle platform version for %s:%s", targetPackage.Name, architecure)
200+
} else if tmpPlatform := tmpPackage.GetOrCreatePlatform(architecture); tmpPlatform == nil {
201+
pm.Log.Warnf("Can't determine bundle platform version for %s:%s", targetPackage.Name, architecture)
202202
} else if tmpPlatformRelease := tmpPlatform.GetLatestRelease(); tmpPlatformRelease == nil {
203-
pm.Log.Warnf("Can't determine bundle platform version for %s:%s, no valid release found", targetPackage.Name, architecure)
203+
pm.Log.Warnf("Can't determine bundle platform version for %s:%s, no valid release found", targetPackage.Name, architecture)
204204
} else {
205205
version = tmpPlatformRelease.Version
206206
}
207207
}
208208

209-
platform := targetPackage.GetOrCreatePlatform(architecure)
209+
platform := targetPackage.GetOrCreatePlatform(architecture)
210210
release, err := platform.GetOrCreateRelease(version)
211211
if err != nil {
212212
return fmt.Errorf("loading platform release: %s", err)
@@ -221,7 +221,7 @@ func (pm *PackageManager) loadPlatforms(targetPackage *cores.Package, packageDir
221221
// case: ARCHITECTURE/VERSION/boards.txt
222222
// let's dive into VERSION directories
223223

224-
platform := targetPackage.GetOrCreatePlatform(architecure)
224+
platform := targetPackage.GetOrCreatePlatform(architecture)
225225
versionDirs, err := platformPath.ReadDir()
226226
if err != nil {
227227
return fmt.Errorf("reading dir %s: %s", platformPath, err)

arduino/cores/status.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ func (packages Packages) GetDepsOfPlatformRelease(release *PlatformRelease) ([]*
9595

9696
// GetOrCreatePlatform returns the Platform object with the specified architecture
9797
// or creates a new one if not found
98-
func (targetPackage *Package) GetOrCreatePlatform(architecure string) *Platform {
99-
if platform, ok := targetPackage.Platforms[architecure]; ok {
98+
func (targetPackage *Package) GetOrCreatePlatform(architecture string) *Platform {
99+
if platform, ok := targetPackage.Platforms[architecture]; ok {
100100
return platform
101101
}
102102
targetPlatform := &Platform{
103-
Architecture: architecure,
103+
Architecture: architecture,
104104
Releases: map[string]*PlatformRelease{},
105105
Package: targetPackage,
106106
}
107-
targetPackage.Platforms[architecure] = targetPlatform
107+
targetPackage.Platforms[architecture] = targetPlatform
108108
return targetPlatform
109109
}
110110

cli/lib/search.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
func initSearchCommand() *cobra.Command {
3636
searchCommand := &cobra.Command{
3737
Use: "search [LIBRARY_NAME]",
38-
Short: "Searchs for one or more libraries data.",
38+
Short: "Searches for one or more libraries data.",
3939
Long: "Search for one or more libraries data (case insensitive search).",
4040
Example: " " + os.Args[0] + " lib search audio",
4141
Args: cobra.ArbitraryArgs,

0 commit comments

Comments
 (0)