Unverified Commit 5f4a92e0 authored by Massimiliano Pippi's avatar Massimiliano Pippi Committed by GitHub

Remove debug prints (#526)

parent d83170eb
...@@ -204,7 +204,6 @@ func LoadIndex(jsonIndexFile *paths.Path) (*Index, error) { ...@@ -204,7 +204,6 @@ func LoadIndex(jsonIndexFile *paths.Path) (*Index, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
//fmt.Println(string(buff))
var index Index var index Index
err = json.Unmarshal(buff, &index) err = json.Unmarshal(buff, &index)
if err != nil { if err != nil {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package packageindex package packageindex
import ( import (
"fmt"
"testing" "testing"
"github.com/arduino/go-paths-helper" "github.com/arduino/go-paths-helper"
...@@ -33,7 +32,6 @@ func TestIndexParsing(t *testing.T) { ...@@ -33,7 +32,6 @@ func TestIndexParsing(t *testing.T) {
if indexFile.Ext() != ".json" { if indexFile.Ext() != ".json" {
continue continue
} }
fmt.Println("Loading:", indexFile)
_, err := LoadIndex(indexFile) _, err := LoadIndex(indexFile)
require.NoError(t, err) require.NoError(t, err)
} }
......
...@@ -214,7 +214,6 @@ func TestBoardOptionsFunctions(t *testing.T) { ...@@ -214,7 +214,6 @@ func TestBoardOptionsFunctions(t *testing.T) {
func TestFindToolsRequiredForBoard(t *testing.T) { func TestFindToolsRequiredForBoard(t *testing.T) {
os.Setenv("ARDUINO_DATA_DIR", dataDir1.String()) os.Setenv("ARDUINO_DATA_DIR", dataDir1.String())
configuration.Init("") configuration.Init("")
fmt.Println(viper.AllSettings())
pm := packagemanager.NewPackageManager( pm := packagemanager.NewPackageManager(
dataDir1, dataDir1,
configuration.PackagesDir(), configuration.PackagesDir(),
......
...@@ -212,7 +212,6 @@ func detectLatestAVRCore(t *testing.T) string { ...@@ -212,7 +212,6 @@ func detectLatestAVRCore(t *testing.T) string {
} }
} }
require.NotEmpty(t, latest, "latest avr core version") require.NotEmpty(t, latest, "latest avr core version")
fmt.Println("Latest AVR core version:", latest)
return latest.String() return latest.String()
} }
......
...@@ -19,7 +19,6 @@ package daemon ...@@ -19,7 +19,6 @@ package daemon
import ( import (
"context" "context"
"fmt"
"io" "io"
"net/http" "net/http"
...@@ -114,7 +113,6 @@ func (s *ArduinoCoreServerImpl) Init(req *rpc.InitReq, stream rpc.ArduinoCore_In ...@@ -114,7 +113,6 @@ func (s *ArduinoCoreServerImpl) Init(req *rpc.InitReq, stream rpc.ArduinoCore_In
if err != nil { if err != nil {
return err return err
} }
fmt.Println(resp)
return stream.Send(resp) return stream.Send(resp)
} }
......
...@@ -19,7 +19,6 @@ import ( ...@@ -19,7 +19,6 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
rpc "github.com/arduino/arduino-cli/rpc/settings" rpc "github.com/arduino/arduino-cli/rpc/settings"
"github.com/spf13/viper" "github.com/spf13/viper"
...@@ -62,8 +61,6 @@ func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest ...@@ -62,8 +61,6 @@ func (s *SettingsService) GetValue(ctx context.Context, req *rpc.GetValueRequest
key := req.GetKey() key := req.GetKey()
value := &rpc.Value{} value := &rpc.Value{}
fmt.Println(viper.AllKeys())
if !viper.InConfig(key) { if !viper.InConfig(key) {
return nil, errors.New("key not found in settings") return nil, errors.New("key not found in settings")
} }
......
...@@ -18,7 +18,6 @@ package daemon ...@@ -18,7 +18,6 @@ package daemon
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"fmt"
"testing" "testing"
"github.com/spf13/viper" "github.com/spf13/viper"
...@@ -54,7 +53,6 @@ func TestMerge(t *testing.T) { ...@@ -54,7 +53,6 @@ func TestMerge(t *testing.T) {
_, err := svc.Merge(context.Background(), &rpc.RawData{JsonData: bulkSettings}) _, err := svc.Merge(context.Background(), &rpc.RawData{JsonData: bulkSettings})
require.Nil(t, err) require.Nil(t, err)
fmt.Println(viper.AllSettings())
require.Equal(t, "420", viper.GetString("daemon.port")) require.Equal(t, "420", viper.GetString("daemon.port"))
require.Equal(t, "bar", viper.GetString("foo")) require.Equal(t, "bar", viper.GetString("foo"))
......
...@@ -148,7 +148,6 @@ func Init(ctx context.Context, req *rpc.InitReq, downloadCB DownloadProgressCB, ...@@ -148,7 +148,6 @@ func Init(ctx context.Context, req *rpc.InitReq, downloadCB DownloadProgressCB,
instances[handle] = instance instances[handle] = instance
if err := instance.checkForBuiltinTools(downloadCB, taskCB, downloaderHeaders); err != nil { if err := instance.checkForBuiltinTools(downloadCB, taskCB, downloaderHeaders); err != nil {
fmt.Println(err)
return nil, err return nil, err
} }
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package test package test
import ( import (
"fmt"
"path/filepath" "path/filepath"
"sort" "sort"
"testing" "testing"
...@@ -317,7 +316,6 @@ func TestIncludesToIncludeFoldersSubfolders(t *testing.T) { ...@@ -317,7 +316,6 @@ func TestIncludesToIncludeFoldersSubfolders(t *testing.T) {
importedLibraries := ctx.ImportedLibraries importedLibraries := ctx.ImportedLibraries
sort.Sort(ByLibraryName(importedLibraries)) sort.Sort(ByLibraryName(importedLibraries))
fmt.Println(importedLibraries)
require.Equal(t, 3, len(importedLibraries)) require.Equal(t, 3, len(importedLibraries))
require.Equal(t, "testlib1", importedLibraries[0].Name) require.Equal(t, "testlib1", importedLibraries[0].Name)
require.Equal(t, "testlib2", importedLibraries[1].Name) require.Equal(t, "testlib2", importedLibraries[1].Name)
......
...@@ -24,7 +24,6 @@ type ToolsLoader struct{} ...@@ -24,7 +24,6 @@ type ToolsLoader struct{}
func (s *ToolsLoader) Run(ctx *types.Context) error { func (s *ToolsLoader) Run(ctx *types.Context) error {
if ctx.CanUseCachedTools { if ctx.CanUseCachedTools {
//fmt.Println("no fs modification, can use cached ctx")
return nil return nil
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment