Skip to content

Commit 321372c

Browse files
authored
[skip-changelog] Some minor adjustments in the codebase (#2006)
* Updated go-paths-helper to v1.8.0 * Pass of go-fmt * Removed unused functions * Removed dep golang.org/x/crypto/ssh/terminal in favor of golang.org/x/term * Fixed wrong error message
1 parent 9193353 commit 321372c

File tree

13 files changed

+17
-88
lines changed

13 files changed

+17
-88
lines changed

Diff for: .licenses/go/github.com/arduino/go-paths-helper.dep.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: github.com/arduino/go-paths-helper
3-
version: v1.7.0
3+
version: v1.8.0
44
type: go
55
summary:
66
homepage: https://pkg.go.dev/github.com/arduino/go-paths-helper

Diff for: .licenses/go/golang.org/x/crypto/ssh/terminal.dep.yml

-63
This file was deleted.

Diff for: arduino/discovery/discovery_client/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
)
1212

1313
require (
14-
github.com/arduino/go-paths-helper v1.7.0 // indirect
14+
github.com/arduino/go-paths-helper v1.8.0 // indirect
1515
github.com/arduino/go-properties-orderedmap v1.7.1 // indirect
1616
github.com/golang/protobuf v1.5.2 // indirect
1717
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect

Diff for: arduino/discovery/discovery_client/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU
4444
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
4545
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
4646
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
47-
github.com/arduino/go-paths-helper v1.7.0 h1:S9l5BP2aogz1CgyqqnncXt0PLpK4yvwOW/wu/LaR3tc=
48-
github.com/arduino/go-paths-helper v1.7.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
47+
github.com/arduino/go-paths-helper v1.8.0 h1:BfA1bq1XktnlqwfUDCoKbUqB3YFPe6X7szPSZj6Rdpk=
48+
github.com/arduino/go-paths-helper v1.8.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
4949
github.com/arduino/go-properties-orderedmap v1.7.1 h1:HQ9Pn/mk3+XyfrE39EEvaZwJkrvgiVSY5Oq3JSEfOR4=
5050
github.com/arduino/go-properties-orderedmap v1.7.1/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
5151
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b/go.mod h1:uwGy5PpN4lqW97FiLnbcx+xx8jly5YuPMJWfVwwjJiQ=

Diff for: arduino/errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (e *InvalidProfileError) ToRPCStatus() *status.Status {
235235
type MissingPortAddressError struct{}
236236

237237
func (e *MissingPortAddressError) Error() string {
238-
return tr("Missing port protocol")
238+
return tr("Missing port address")
239239
}
240240

241241
// ToRPCStatus converts the error into a *status.Status

Diff for: cli/arguments/user_fields.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/arduino/arduino-cli/cli/feedback"
2424
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
25-
"golang.org/x/crypto/ssh/terminal"
25+
"golang.org/x/term"
2626
)
2727

2828
// AskForUserFields prompts the user to input the provided user fields.
@@ -36,7 +36,7 @@ func AskForUserFields(userFields []*rpc.UserField) map[string]string {
3636
var value []byte
3737
var err error
3838
if f.Secret {
39-
value, err = terminal.ReadPassword(int(os.Stdin.Fd()))
39+
value, err = term.ReadPassword(int(os.Stdin.Fd()))
4040
} else {
4141
value, err = reader.ReadBytes('\n')
4242
}

Diff for: cli/output/rpc_progress.go

-10
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ func NewDownloadProgressBarCB() func(*rpc.DownloadProgress) {
9393
}
9494
}
9595

96-
// NewNullDownloadProgressCB returns a progress bar callback that outputs nothing.
97-
func NewNullDownloadProgressCB() func(*rpc.DownloadProgress) {
98-
return func(*rpc.DownloadProgress) {}
99-
}
100-
10196
// NewTaskProgressCB returns a commands.TaskProgressCB progress listener
10297
// that outputs to terminal
10398
func NewTaskProgressCB() func(curr *rpc.TaskProgress) {
@@ -121,8 +116,3 @@ func NewTaskProgressCB() func(curr *rpc.TaskProgress) {
121116
}
122117
}
123118
}
124-
125-
// NewNullTaskProgressCB returns a progress bar callback that outputs nothing.
126-
func NewNullTaskProgressCB() func(curr *rpc.TaskProgress) {
127-
return func(curr *rpc.TaskProgress) {}
128-
}

Diff for: client_example/go.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU
4444
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
4545
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
4646
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
47-
github.com/arduino/go-paths-helper v1.7.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
47+
github.com/arduino/go-paths-helper v1.8.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
4848
github.com/arduino/go-properties-orderedmap v1.7.1/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
4949
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b/go.mod h1:uwGy5PpN4lqW97FiLnbcx+xx8jly5YuPMJWfVwwjJiQ=
5050
github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b/go.mod h1:iIPnclBMYm1g32Q5kXoqng4jLhMStReIP7ZxaoUC2y8=

Diff for: commands/upload/upload.go

+2
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,13 @@ func detectSketchNameFromBuildPath(buildPath *paths.Path) (string, error) {
629629
// specified protocol properties.
630630
//
631631
// For example passing the below properties and "upload" as action and "serial" as protocol:
632+
//
632633
// upload.speed=256
633634
// upload.serial.speed=57600
634635
// upload.network.speed=19200
635636
//
636637
// will return:
638+
//
637639
// upload.speed=57600
638640
// upload.serial.speed=57600
639641
// upload.network.speed=19200

Diff for: docsgen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
)
1212

1313
require (
14-
github.com/arduino/go-paths-helper v1.7.0 // indirect
14+
github.com/arduino/go-paths-helper v1.8.0 // indirect
1515
github.com/arduino/go-properties-orderedmap v1.7.1 // indirect
1616
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b // indirect
1717
github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b // indirect

Diff for: docsgen/go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU
4646
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
4747
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
4848
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
49-
github.com/arduino/go-paths-helper v1.7.0 h1:S9l5BP2aogz1CgyqqnncXt0PLpK4yvwOW/wu/LaR3tc=
50-
github.com/arduino/go-paths-helper v1.7.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
49+
github.com/arduino/go-paths-helper v1.8.0 h1:BfA1bq1XktnlqwfUDCoKbUqB3YFPe6X7szPSZj6Rdpk=
50+
github.com/arduino/go-paths-helper v1.8.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
5151
github.com/arduino/go-properties-orderedmap v1.7.1 h1:HQ9Pn/mk3+XyfrE39EEvaZwJkrvgiVSY5Oq3JSEfOR4=
5252
github.com/arduino/go-properties-orderedmap v1.7.1/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
5353
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b h1:9hDi4F2st6dbLC3y4i02zFT5quS4X6iioWifGlVwfy4=

Diff for: go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ go 1.17
66
replace github.com/mailru/easyjson => github.com/cmaglie/easyjson v0.8.1
77

88
require (
9-
github.com/arduino/go-paths-helper v1.7.0
9+
github.com/arduino/go-paths-helper v1.8.0
1010
github.com/arduino/go-properties-orderedmap v1.7.1
1111
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b
1212
github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b
@@ -51,6 +51,7 @@ require (
5151
require (
5252
github.com/rogpeppe/go-internal v1.3.0
5353
go.bug.st/testifyjson v1.1.1
54+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
5455
gopkg.in/yaml.v3 v3.0.1
5556
)
5657

@@ -87,7 +88,6 @@ require (
8788
github.com/xanzy/ssh-agent v0.2.1 // indirect
8889
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
8990
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
90-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
9191
gopkg.in/ini.v1 v1.62.0 // indirect
9292
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
9393
gopkg.in/warnings.v0 v0.1.2 // indirect

Diff for: go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU
4646
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
4747
github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
4848
github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck=
49-
github.com/arduino/go-paths-helper v1.7.0 h1:S9l5BP2aogz1CgyqqnncXt0PLpK4yvwOW/wu/LaR3tc=
50-
github.com/arduino/go-paths-helper v1.7.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
49+
github.com/arduino/go-paths-helper v1.8.0 h1:BfA1bq1XktnlqwfUDCoKbUqB3YFPe6X7szPSZj6Rdpk=
50+
github.com/arduino/go-paths-helper v1.8.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU=
5151
github.com/arduino/go-properties-orderedmap v1.7.1 h1:HQ9Pn/mk3+XyfrE39EEvaZwJkrvgiVSY5Oq3JSEfOR4=
5252
github.com/arduino/go-properties-orderedmap v1.7.1/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk=
5353
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b h1:9hDi4F2st6dbLC3y4i02zFT5quS4X6iioWifGlVwfy4=

0 commit comments

Comments
 (0)