-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
// a commercial license, send an email to [email protected]. | ||
// | ||
|
||
// Package args provides functionality to parse command-line arguments. | ||
// It includes a function to parse arguments passed by the user and a variable to check if the version flag is set. | ||
// The package also handles invalid arguments by printing an error message and exiting the program. | ||
package args | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
// a commercial license, send an email to [email protected]. | ||
// | ||
|
||
// Package main implements the serial monitor | ||
package main | ||
|
||
import ( | ||
|
@@ -106,6 +107,7 @@ func NewSerialMonitor() *SerialMonitor { | |
} | ||
|
||
// Hello is the handler for the pluggable-monitor HELLO command | ||
// revive:disable:unused-parameter | ||
func (d *SerialMonitor) Hello(userAgent string, protocol int) error { | ||
return nil | ||
} | ||
|
@@ -171,7 +173,10 @@ func (d *SerialMonitor) Close() error { | |
if !d.openedPort { | ||
return errors.New("port already closed") | ||
} | ||
d.serialPort.Close() | ||
err := d.serialPort.Close() | ||
if err != nil { | ||
return err | ||
} | ||
d.openedPort = false | ||
return nil | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ | |
// a commercial license, send an email to [email protected]. | ||
// | ||
|
||
// Package version provides information about the version of the application. | ||
// It includes the version string, commit hash, and timestamp. | ||
// The package also defines a struct `Info` that represents the version information. | ||
// The `newInfo` function creates a new `Info` instance with the provided application name. | ||
// The `String` method of the `Info` struct returns a formatted string representation of the version information. | ||
// The package also initializes the `Version` variable with a default version string if it is empty. | ||
package version | ||
|
||
import ( | ||
|