Skip to content

Commit 228c2b2

Browse files
committed
make linter happy
1 parent aad48b0 commit 228c2b2

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

args/args.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// a commercial license, send an email to license@arduino.cc.
1616
//
1717

18+
// Package args provides functionality to parse command-line arguments.
19+
// It includes a function to parse arguments passed by the user and a variable to check if the version flag is set.
20+
// The package also handles invalid arguments by printing an error message and exiting the program.
1821
package args
1922

2023
import (

main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// a commercial license, send an email to license@arduino.cc.
1616
//
1717

18+
// Package main implements the serial monitor
1819
package main
1920

2021
import (
@@ -106,6 +107,7 @@ func NewSerialMonitor() *SerialMonitor {
106107
}
107108

108109
// Hello is the handler for the pluggable-monitor HELLO command
110+
// revive:disable:unused-parameter
109111
func (d *SerialMonitor) Hello(userAgent string, protocol int) error {
110112
return nil
111113
}
@@ -171,7 +173,10 @@ func (d *SerialMonitor) Close() error {
171173
if !d.openedPort {
172174
return errors.New("port already closed")
173175
}
174-
d.serialPort.Close()
176+
err := d.serialPort.Close()
177+
if err != nil {
178+
return err
179+
}
175180
d.openedPort = false
176181
return nil
177182
}

version/version.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
// a commercial license, send an email to license@arduino.cc.
1616
//
1717

18+
// Package version provides information about the version of the application.
19+
// It includes the version string, commit hash, and timestamp.
20+
// The package also defines a struct `Info` that represents the version information.
21+
// The `newInfo` function creates a new `Info` instance with the provided application name.
22+
// The `String` method of the `Info` struct returns a formatted string representation of the version information.
23+
// The package also initializes the `Version` variable with a default version string if it is empty.
1824
package version
1925

2026
import (

0 commit comments

Comments
 (0)