File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 15
15
// a commercial license, send an email to license@arduino.cc.
16
16
//
17
17
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.
18
21
package args
19
22
20
23
import (
Original file line number Diff line number Diff line change 15
15
// a commercial license, send an email to license@arduino.cc.
16
16
//
17
17
18
+ // Package main implements the serial monitor
18
19
package main
19
20
20
21
import (
@@ -106,6 +107,7 @@ func NewSerialMonitor() *SerialMonitor {
106
107
}
107
108
108
109
// Hello is the handler for the pluggable-monitor HELLO command
110
+ // revive:disable:unused-parameter
109
111
func (d * SerialMonitor ) Hello (userAgent string , protocol int ) error {
110
112
return nil
111
113
}
@@ -171,7 +173,10 @@ func (d *SerialMonitor) Close() error {
171
173
if ! d .openedPort {
172
174
return errors .New ("port already closed" )
173
175
}
174
- d .serialPort .Close ()
176
+ err := d .serialPort .Close ()
177
+ if err != nil {
178
+ return err
179
+ }
175
180
d .openedPort = false
176
181
return nil
177
182
}
Original file line number Diff line number Diff line change 15
15
// a commercial license, send an email to license@arduino.cc.
16
16
//
17
17
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.
18
24
package version
19
25
20
26
import (
You can’t perform that action at this time.
0 commit comments