Skip to content

Commit 918c979

Browse files
author
Roberto Sora
committed
tidy go mod and reorganize imports and tidy long lines
1 parent 98fe080 commit 918c979

File tree

11 files changed

+59
-61
lines changed

11 files changed

+59
-61
lines changed

cli/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
// appName is the command line name of the Arduino CLI executable on the user system (users may change it)
5656
var appName = filepath.Base(os.Args[0])
5757

58-
// func NewInfo(application string, versionString string, commit string) *Info {
58+
// VersionInfo contains all info injected during build
5959
var VersionInfo = version.NewInfo(appName)
6060

6161
// ErrLogrus represents the logrus instance, which has the role to

cli/version/version.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package version
1919

2020
import (
2121
"fmt"
22-
"github.com/arduino/arduino-cli/global"
2322

2423
"github.com/arduino/arduino-cli/cli"
2524
"github.com/spf13/cobra"

commands/bundled_tools.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import (
2727
)
2828

2929
// DownloadToolRelease downloads a ToolRelease
30-
func DownloadToolRelease(pm *packagemanager.PackageManager, toolRelease *cores.ToolRelease, downloadCB DownloadProgressCB, downloaderHeaders http.Header) error {
30+
func DownloadToolRelease(pm *packagemanager.PackageManager, toolRelease *cores.ToolRelease,
31+
downloadCB DownloadProgressCB, downloaderHeaders http.Header) error {
3132
resp, err := pm.DownloadToolRelease(toolRelease, downloaderHeaders)
3233
if err != nil {
3334
return err

commands/core/download.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import (
2929
"github.com/arduino/arduino-cli/rpc"
3030
)
3131

32-
func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadReq, downloadCB commands.DownloadProgressCB, downloaderHeaders http.Header) (*rpc.PlatformDownloadResp, error) {
32+
func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadReq, downloadCB commands.DownloadProgressCB,
33+
downloaderHeaders http.Header) (*rpc.PlatformDownloadResp, error) {
3334
pm := commands.GetPackageManager(req)
3435
if pm == nil {
3536
return nil, errors.New("invalid instance")
@@ -64,7 +65,8 @@ func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadReq, downloa
6465
return &rpc.PlatformDownloadResp{}, nil
6566
}
6667

67-
func downloadPlatform(pm *packagemanager.PackageManager, platformRelease *cores.PlatformRelease, downloadCB commands.DownloadProgressCB, downloaderHeaders http.Header) error {
68+
func downloadPlatform(pm *packagemanager.PackageManager, platformRelease *cores.PlatformRelease,
69+
downloadCB commands.DownloadProgressCB, downloaderHeaders http.Header) error {
6870
// Download platform
6971
resp, err := pm.DownloadPlatformRelease(platformRelease, downloaderHeaders)
7072
if err != nil {
@@ -73,7 +75,8 @@ func downloadPlatform(pm *packagemanager.PackageManager, platformRelease *cores.
7375
return commands.Download(resp, platformRelease.String(), downloadCB)
7476
}
7577

76-
func downloadTool(pm *packagemanager.PackageManager, tool *cores.ToolRelease, downloadCB commands.DownloadProgressCB, downloaderHeaders http.Header) error {
78+
func downloadTool(pm *packagemanager.PackageManager, tool *cores.ToolRelease, downloadCB commands.DownloadProgressCB,
79+
downloaderHeaders http.Header) error {
7780
// Check if tool has a flavor available for the current OS
7881
if tool.GetCompatibleFlavour() == nil {
7982
return fmt.Errorf("tool %s not available for the current OS", tool)

commands/instances.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ func GetDiscoveries(req InstanceContainer) []*discovery.Discovery {
8383
return i.discoveries
8484
}
8585

86-
func (instance *CoreInstance) installToolIfMissing(tool *cores.ToolRelease, downloadCB DownloadProgressCB, taskCB TaskProgressCB, downloaderHeaders http.Header) (bool, error) {
86+
func (instance *CoreInstance) installToolIfMissing(tool *cores.ToolRelease, downloadCB DownloadProgressCB,
87+
taskCB TaskProgressCB, downloaderHeaders http.Header) (bool, error) {
8788
if tool.IsInstalled() {
8889
return false, nil
8990
}
@@ -98,7 +99,8 @@ func (instance *CoreInstance) installToolIfMissing(tool *cores.ToolRelease, down
9899
return true, nil
99100
}
100101

101-
func (instance *CoreInstance) checkForBuiltinTools(downloadCB DownloadProgressCB, taskCB TaskProgressCB, downloaderHeaders http.Header) error {
102+
func (instance *CoreInstance) checkForBuiltinTools(downloadCB DownloadProgressCB, taskCB TaskProgressCB,
103+
downloaderHeaders http.Header) error {
102104
// Check for ctags tool
103105
ctags, _ := getBuiltinCtagsTool(instance.pm)
104106
ctagsInstalled, err := instance.installToolIfMissing(ctags, downloadCB, taskCB, downloaderHeaders)

commands/lib/download.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import (
2929
"github.com/sirupsen/logrus"
3030
)
3131

32-
func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadReq, downloadCB commands.DownloadProgressCB, downloaderHeaders http.Header) (*rpc.LibraryDownloadResp, error) {
32+
func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadReq, downloadCB commands.DownloadProgressCB,
33+
downloaderHeaders http.Header) (*rpc.LibraryDownloadResp, error) {
3334
logrus.Info("Executing `arduino lib download`")
3435

3536
lm := commands.GetLibraryManager(req)

commands/lib/upgrade.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import (
2626
"github.com/arduino/arduino-cli/rpc"
2727
)
2828

29-
func LibraryUpgradeAll(ctx context.Context, req *rpc.LibraryUpgradeAllReq, downloadCB commands.DownloadProgressCB, taskCB commands.TaskProgressCB, downloaderHeaders http.Header) error {
29+
func LibraryUpgradeAll(ctx context.Context, req *rpc.LibraryUpgradeAllReq, downloadCB commands.DownloadProgressCB,
30+
taskCB commands.TaskProgressCB, downloaderHeaders http.Header) error {
3031
lm := commands.GetLibraryManager(req)
3132

3233
// Obtain the list of upgradable libraries

go.mod

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ go 1.12
55
require (
66
bou.ke/monkey v1.0.1 // indirect
77
github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c
8-
github.com/arduino/go-paths-helper v0.0.0-20190214132331-c3c98d1bf2e1
8+
github.com/arduino/go-paths-helper v1.0.0
99
github.com/arduino/go-properties-orderedmap v0.0.0-20181003091528-89278049acd3
1010
github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b
1111
github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b
1212
github.com/bouk/monkey v1.0.1
1313
github.com/cmaglie/pb v1.0.27
1414
github.com/codeclysm/cc v1.2.2 // indirect
1515
github.com/codeclysm/extract v2.2.0+incompatible
16-
github.com/creack/goselect v0.0.0-20180328191401-176c667f75aa // indirect
17-
github.com/fatih/color v1.6.0
16+
github.com/creack/goselect v0.1.0 // indirect
17+
github.com/fatih/color v1.7.0
1818
github.com/fluxio/iohelpers v0.0.0-20160419043813-3a4dd67a94d2 // indirect
1919
github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5 // indirect
2020
github.com/fsnotify/fsnotify v1.4.7
2121
github.com/go-errors/errors v1.0.1
2222
github.com/golang/protobuf v1.3.1
23-
github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282
23+
github.com/gosuri/uitable v0.0.3
2424
github.com/h2non/filetype v1.0.8 // indirect
25-
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect
25+
github.com/juju/errors v0.0.0-20190207033735-e65537c515d7 // indirect
2626
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect
2727
github.com/juju/testing v0.0.0-20190429233213-dfc56b8c09fc // indirect
2828
github.com/mattn/go-colorable v0.1.2
29-
github.com/mattn/go-runewidth v0.0.2 // indirect
30-
github.com/miekg/dns v1.0.5 // indirect
29+
github.com/mattn/go-runewidth v0.0.4 // indirect
30+
github.com/miekg/dns v1.1.14 // indirect
3131
github.com/mitchellh/go-homedir v1.1.0
3232
github.com/oleksandr/bonjour v0.0.0-20160508152359-5dcf00d8b228 // indirect
3333
github.com/pkg/errors v0.8.1
@@ -36,16 +36,15 @@ require (
3636
github.com/sergi/go-diff v1.0.0
3737
github.com/sirupsen/logrus v1.4.2
3838
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
39-
github.com/spf13/cobra v0.0.4
39+
github.com/spf13/cobra v0.0.5
4040
github.com/stretchr/testify v1.3.0
4141
go.bug.st/cleanup v1.0.0
4242
go.bug.st/downloader v1.1.0
4343
go.bug.st/relaxed-semver v0.0.0-20181022103824-0265409c5852
4444
go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45
45-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
46-
golang.org/x/net v0.0.0-20190311183353-d8887717615a
47-
golang.org/x/text v0.3.0
48-
google.golang.org/genproto v0.0.0-20190327125643-d831d65fe17d // indirect
45+
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5
46+
golang.org/x/net v0.0.0-20190607181551-461777fb6f67
47+
golang.org/x/text v0.3.2
4948
google.golang.org/grpc v1.21.1
5049
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
5150
gopkg.in/yaml.v2 v2.2.2

0 commit comments

Comments
 (0)