Skip to content

Commit 0616522

Browse files
Paolo Calaopolldo
authored andcommitted
Improve comments (#83)
Add a trailing dot at the end of comments on top of declarations
1 parent de239ac commit 0616522

File tree

19 files changed

+36
-36
lines changed

19 files changed

+36
-36
lines changed

arduino/commander.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
// Commander of arduino package allows to call
25-
// the arduino-cli commands in a programmatic way
25+
// the arduino-cli commands in a programmatic way.
2626
type Commander interface {
2727
BoardList() ([]*rpc.DetectedPort, error)
2828
UploadBin(fqbn, bin, port string) error

arduino/dir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/arduino/go-win32-utils"
2828
)
2929

30-
// DataDir returns the Arduino default data directory (arduino15)
30+
// DataDir returns the Arduino default data directory (arduino15).
3131
func DataDir() (*paths.Path, error) {
3232
userHomeDir, err := os.UserHomeDir()
3333
if err != nil {

arduino/grpc/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type client struct {
4343
// NewClient instantiates and returns a new grpc client that allows to
4444
// programmatically call arduino-cli commands.
4545
// It exploits the grpc interface of the arduino-cli.
46-
// It returns: the client instance, a callback to close the client and an error
46+
// It returns: the client instance, a callback to close the client and an error.
4747
func NewClient() (arduino.Commander, func() error, error) {
4848
// Establish a connection with the gRPC server, started with the command:
4949
// arduino-cli daemon

cli/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/spf13/cobra"
2626
)
2727

28-
// NewCommand created a new `version` command
28+
// NewCommand creates a new `version` command.
2929
func NewCommand() *cobra.Command {
3030
return &cobra.Command{
3131
Use: "version",

command/dashboard/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type CreateParams struct {
3232
Template string // Path of the template file
3333
}
3434

35-
// Create allows to create a new dashboard
35+
// Create allows to create a new dashboard.
3636
func Create(params *CreateParams) (*DashboardInfo, error) {
3737
conf, err := config.Retrieve()
3838
if err != nil {

command/device/board.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var (
3939
}
4040
)
4141

42-
// board contains details of a physical arduino board
42+
// board contains details of a physical arduino board.
4343
type board struct {
4444
fqbn string
4545
serial string
@@ -48,7 +48,7 @@ type board struct {
4848
}
4949

5050
// isCrypto checks if the board is a valid arduino board with a
51-
// supported crypto-chip
51+
// supported crypto-chip.
5252
func (b *board) isCrypto() bool {
5353
for _, f := range cryptoFQBN {
5454
if b.fqbn == f {
@@ -58,7 +58,7 @@ func (b *board) isCrypto() bool {
5858
return false
5959
}
6060

61-
// isCrypto checks if the board is a valid LoRa arduino board
61+
// isLora checks if the board is a valid LoRa arduino board.
6262
func (b *board) isLora() bool {
6363
for _, f := range loraFQBN {
6464
if b.fqbn == f {
@@ -94,8 +94,8 @@ func boardFromPorts(ports []*rpc.DetectedPort, params *CreateParams) *board {
9494
// - if the port parameter does not match the actual port address.
9595
// - if the the detected port does not contain any board.
9696
// It returns:
97-
// true -> to skip the port
98-
// false -> to keep the port
97+
// true -> to skip the port.
98+
// false -> to keep the port.
9999
func portFilter(port *rpc.DetectedPort, params *CreateParams) bool {
100100
if len(port.Boards) == 0 {
101101
return true

command/device/createlora.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
serialEUIBaudrate = 9600
4141

4242
// dev-eui is an IEEE EUI64 address, so it must have length of 8 bytes.
43-
// It's retrieved as hexadecimal string, thus 16 chars are expected
43+
// It's retrieved as hexadecimal string, thus 16 chars are expected.
4444
deveuiLength = 16
4545
)
4646

command/device/provision.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func downloadProvisioningFile(fqbn string) (string, error) {
6464
}
6565

6666
// provision is responsible for running the provisioning
67-
// procedures for boards with crypto-chip
67+
// procedures for boards with crypto-chip.
6868
type provision struct {
6969
arduino.Commander
7070
iot.Client
@@ -73,7 +73,7 @@ type provision struct {
7373
id string
7474
}
7575

76-
// run provisioning procedure for boards with crypto-chip
76+
// run provisioning procedure for boards with crypto-chip.
7777
func (p provision) run() error {
7878
bin, err := downloadProvisioningFile(p.board.fqbn)
7979
if err != nil {

command/ota/massupload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type MassUploadParams struct {
4343
FQBN string
4444
}
4545

46-
// Result of an ota upload on a device
46+
// Result of an ota upload on a device.
4747
type Result struct {
4848
ID string
4949
Err error

command/tag/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type CreateTagsParams struct {
3333
}
3434

3535
// CreateTags allows to create or overwrite tags
36-
// on a resource of Arduino IoT Cloud
36+
// on a resource of Arduino IoT Cloud.
3737
func CreateTags(params *CreateTagsParams) error {
3838
conf, err := config.Retrieve()
3939
if err != nil {

0 commit comments

Comments
 (0)