Skip to content

Commit 69d9ae7

Browse files
cmaglieper1234
andauthored
Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
1 parent e9e5fbd commit 69d9ae7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: arduino/discovery/discovery.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type Port struct {
9797

9898
var tr = i18n.Tr
9999

100-
// Equals return true if the given port has the same address and protocol
100+
// Equals returns true if the given port has the same address and protocol
101101
// of the current port.
102102
func (p *Port) Equals(o *Port) bool {
103103
return p.Address == o.Address && p.Protocol == o.Protocol

Diff for: commands/upload/upload.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func detectUploadPort(
538538
return
539539
}
540540
if candidate != nil && ev.Type == "remove" && ev.Port.Equals(candidate) {
541-
log.WithField("event", ev).Trace("User-specified port has been disconnected, forcing waiting for upload port")
541+
log.WithField("event", ev).Trace("User-specified port has been disconnected, forcing wait for upload port")
542542
waitForUploadPort = true
543543
candidate = nil
544544
} else {
@@ -565,12 +565,12 @@ func detectUploadPort(
565565
return
566566
}
567567
if candidate != nil && ev.Type == "remove" && candidate.Equals(ev.Port) {
568-
log.WithField("event", ev).Trace("Candidate port is no more available")
568+
log.WithField("event", ev).Trace("Candidate port is no longer available")
569569
candidate = nil
570570
if !waitForUploadPort {
571571
waitForUploadPort = true
572572
timeout = time.After(5 * time.Second)
573-
log.Trace("User-specified port has been disconnected, now waiting for upload port, timeout exteneded by 5 seconds")
573+
log.Trace("User-specified port has been disconnected, now waiting for upload port, timeout extended by 5 seconds")
574574
}
575575
continue
576576
}

Diff for: internal/algorithms/channels.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package f
1717

1818
import "sync"
1919

20-
// DiscardCh consume all incoming messages from the given channel until its closed.
20+
// DiscardCh consumes all incoming messages from the given channel until it's closed.
2121
func DiscardCh[T any](ch <-chan T) {
2222
for range ch {
2323
}

0 commit comments

Comments
 (0)