Skip to content

Commit e25f08e

Browse files
committed
Renamed 'again'->'present' and 'found'->'matched' for clarity
1 parent 46cadd4 commit e25f08e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (pm *PackageManager) IdentifyBoard(idProps *properties.Map) []*cores.Board
3030
return []*cores.Board{}
3131
}
3232

33-
checkSuffix := func(props *properties.Map, s string) (checked bool, found bool) {
33+
checkSuffix := func(props *properties.Map, s string) (present bool, matched bool) {
3434
for k, v1 := range idProps.AsMap() {
3535
v2, ok := props.GetOk(k + s)
3636
if !ok {
@@ -45,17 +45,17 @@ func (pm *PackageManager) IdentifyBoard(idProps *properties.Map) []*cores.Board
4545

4646
foundBoards := []*cores.Board{}
4747
for _, board := range pm.InstalledBoards() {
48-
if _, found := checkSuffix(board.Properties, ""); found {
48+
if _, matched := checkSuffix(board.Properties, ""); matched {
4949
foundBoards = append(foundBoards, board)
5050
continue
5151
}
5252
id := 0
5353
for {
54-
again, found := checkSuffix(board.Properties, fmt.Sprintf(".%d", id))
55-
if found {
54+
present, matched := checkSuffix(board.Properties, fmt.Sprintf(".%d", id))
55+
if matched {
5656
foundBoards = append(foundBoards, board)
5757
}
58-
if !again && id > 0 { // Always check id 0 and 1 (https://github.com/arduino/arduino-cli/issues/456)
58+
if !present && id > 0 { // Always check id 0 and 1 (https://github.com/arduino/arduino-cli/issues/456)
5959
break
6060
}
6161
id++

0 commit comments

Comments
 (0)