From 1f3ddc646b1d071fbfa384413d82e15baa8e8afc Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Fri, 20 Dec 2019 13:36:54 +0100 Subject: [PATCH] remove debug fmt.Println --- arduino/cores/packageindex/index.go | 1 - arduino/cores/packageindex/index_test.go | 2 -- arduino/cores/packagemanager/package_manager_test.go | 1 - cli/cli_test.go | 1 - commands/daemon/daemon.go | 2 -- commands/daemon/settings.go | 3 --- commands/daemon/settings_test.go | 2 -- commands/instances.go | 1 - legacy/builder/test/includes_to_include_folders_test.go | 2 -- legacy/builder/tools_loader.go | 1 - 10 files changed, 16 deletions(-) diff --git a/arduino/cores/packageindex/index.go b/arduino/cores/packageindex/index.go index b66b4d1561c..9f8d0f1265a 100644 --- a/arduino/cores/packageindex/index.go +++ b/arduino/cores/packageindex/index.go @@ -206,7 +206,6 @@ func LoadIndex(jsonIndexFile *paths.Path) (*Index, error) { if err != nil { return nil, err } - //fmt.Println(string(buff)) var index Index err = json.Unmarshal(buff, &index) if err != nil { diff --git a/arduino/cores/packageindex/index_test.go b/arduino/cores/packageindex/index_test.go index 5e2b41c8c41..54143c3a6b1 100644 --- a/arduino/cores/packageindex/index_test.go +++ b/arduino/cores/packageindex/index_test.go @@ -18,7 +18,6 @@ package packageindex import ( - "fmt" "testing" "github.com/arduino/go-paths-helper" @@ -35,7 +34,6 @@ func TestIndexParsing(t *testing.T) { if indexFile.Ext() != ".json" { continue } - fmt.Println("Loading:", indexFile) _, err := LoadIndex(indexFile) require.NoError(t, err) } diff --git a/arduino/cores/packagemanager/package_manager_test.go b/arduino/cores/packagemanager/package_manager_test.go index 03fcd8cd9c2..7df96786fd3 100644 --- a/arduino/cores/packagemanager/package_manager_test.go +++ b/arduino/cores/packagemanager/package_manager_test.go @@ -216,7 +216,6 @@ func TestBoardOptionsFunctions(t *testing.T) { func TestFindToolsRequiredForBoard(t *testing.T) { os.Setenv("ARDUINO_DATA_DIR", dataDir1.String()) configuration.Init("") - fmt.Println(viper.AllSettings()) pm := packagemanager.NewPackageManager( dataDir1, configuration.PackagesDir(), diff --git a/cli/cli_test.go b/cli/cli_test.go index 9998162ae9b..92537a61df3 100644 --- a/cli/cli_test.go +++ b/cli/cli_test.go @@ -206,7 +206,6 @@ func detectLatestAVRCore(t *testing.T) string { } } require.NotEmpty(t, latest, "latest avr core version") - fmt.Println("Latest AVR core version:", latest) return latest.String() } diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index e31d07e83d8..3927c20befd 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -21,7 +21,6 @@ package daemon import ( "context" - "fmt" "io" "net/http" @@ -116,7 +115,6 @@ func (s *ArduinoCoreServerImpl) Init(req *rpc.InitReq, stream rpc.ArduinoCore_In if err != nil { return err } - fmt.Println(resp) return stream.Send(resp) } diff --git a/commands/daemon/settings.go b/commands/daemon/settings.go index 57757934bbb..2f7464e78a6 100644 --- a/commands/daemon/settings.go +++ b/commands/daemon/settings.go @@ -19,7 +19,6 @@ import ( "context" "encoding/json" "errors" - "fmt" rpc "github.com/arduino/arduino-cli/rpc/settings" "github.com/spf13/viper" @@ -62,8 +61,6 @@ func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest key := req.GetKey() value := &rpc.Value{} - fmt.Println(viper.AllKeys()) - if !viper.InConfig(key) { return nil, errors.New("key not found in settings") } diff --git a/commands/daemon/settings_test.go b/commands/daemon/settings_test.go index 6a88cf82c93..62d40b00555 100644 --- a/commands/daemon/settings_test.go +++ b/commands/daemon/settings_test.go @@ -18,7 +18,6 @@ package daemon import ( "context" "encoding/json" - "fmt" "testing" "github.com/spf13/viper" @@ -54,7 +53,6 @@ func TestMerge(t *testing.T) { _, err := svc.Merge(context.Background(), &rpc.RawData{JsonData: bulkSettings}) require.Nil(t, err) - fmt.Println(viper.AllSettings()) require.Equal(t, "420", viper.GetString("daemon.port")) require.Equal(t, "bar", viper.GetString("foo")) diff --git a/commands/instances.go b/commands/instances.go index 1ffb035f145..0b84fc49dd6 100644 --- a/commands/instances.go +++ b/commands/instances.go @@ -144,7 +144,6 @@ func Init(ctx context.Context, req *rpc.InitReq, downloadCB DownloadProgressCB, instances[handle] = instance if err := instance.checkForBuiltinTools(downloadCB, taskCB, downloaderHeaders); err != nil { - fmt.Println(err) return nil, err } diff --git a/legacy/builder/test/includes_to_include_folders_test.go b/legacy/builder/test/includes_to_include_folders_test.go index 64ef55773ae..65ffc31ae1d 100644 --- a/legacy/builder/test/includes_to_include_folders_test.go +++ b/legacy/builder/test/includes_to_include_folders_test.go @@ -30,7 +30,6 @@ package test import ( - "fmt" "path/filepath" "sort" "testing" @@ -331,7 +330,6 @@ func TestIncludesToIncludeFoldersSubfolders(t *testing.T) { importedLibraries := ctx.ImportedLibraries sort.Sort(ByLibraryName(importedLibraries)) - fmt.Println(importedLibraries) require.Equal(t, 3, len(importedLibraries)) require.Equal(t, "testlib1", importedLibraries[0].Name) require.Equal(t, "testlib2", importedLibraries[1].Name) diff --git a/legacy/builder/tools_loader.go b/legacy/builder/tools_loader.go index 82b5256f0da..e20cba190a2 100644 --- a/legacy/builder/tools_loader.go +++ b/legacy/builder/tools_loader.go @@ -38,7 +38,6 @@ type ToolsLoader struct{} func (s *ToolsLoader) Run(ctx *types.Context) error { if ctx.CanUseCachedTools { - //fmt.Println("no fs modification, can use cached ctx") return nil }