Commit c428dc37 authored by Cristian Maglie's avatar Cristian Maglie Committed by Cristian Maglie

Global round of go-fmt

parent 5b724c6f
......@@ -26,14 +26,14 @@ import (
"sort"
"strings"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
"github.com/arduino/arduino-cli/arduino/sketches"
"github.com/arduino/arduino-cli/cli"
"github.com/arduino/arduino-cli/commands"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/rpc"
paths "github.com/arduino/go-paths-helper"
properties "github.com/arduino/go-properties-orderedmap"
......
......@@ -30,10 +30,10 @@
package builder
import (
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
)
type AddAdditionalEntriesToContext struct{}
......
......@@ -70,16 +70,16 @@ func main() {
exampleParames := pb.BuildParams{
BuiltInLibrariesFolders: "/ssd/Arduino-master/build/linux/work/libraries",
CustomBuildProperties: "build.warn_data_percentage=75",
FQBN: "arduino:avr:mega:cpu=atmega2560",
HardwareFolders: "/ssd/Arduino-master/build/linux/work/hardware,/home/martino/.arduino15/packages,/home/martino/eslov-sk/hardware",
OtherLibrariesFolders: "/home/martino/eslov-sk/libraries",
ArduinoAPIVersion: "10805",
SketchLocation: "/home/martino/eslov-sk/libraries/WiFi101/examples/ScanNetworks/ScanNetworks.ino",
ToolsFolders: "/ssd/Arduino-master/build/linux/work/tools-builder,/ssd/Arduino-master/build/linux/work/hardware/tools/avr,/home/martino/.arduino15/packages",
Verbose: true,
WarningsLevel: "all",
BuildCachePath: "/tmp/arduino_cache_761418/",
CodeCompleteAt: "/home/martino/eslov-sk/libraries/WiFi101/examples/ScanNetworks/ScanNetworks.ino:56:9",
FQBN: "arduino:avr:mega:cpu=atmega2560",
HardwareFolders: "/ssd/Arduino-master/build/linux/work/hardware,/home/martino/.arduino15/packages,/home/martino/eslov-sk/hardware",
OtherLibrariesFolders: "/home/martino/eslov-sk/libraries",
ArduinoAPIVersion: "10805",
SketchLocation: "/home/martino/eslov-sk/libraries/WiFi101/examples/ScanNetworks/ScanNetworks.ino",
ToolsFolders: "/ssd/Arduino-master/build/linux/work/tools-builder,/ssd/Arduino-master/build/linux/work/hardware/tools/avr,/home/martino/.arduino15/packages",
Verbose: true,
WarningsLevel: "all",
BuildCachePath: "/tmp/arduino_cache_761418/",
CodeCompleteAt: "/home/martino/eslov-sk/libraries/WiFi101/examples/ScanNetworks/ScanNetworks.ino:56:9",
}
//build(client, &exampleParames)
......
......@@ -112,12 +112,12 @@ import (
"os/exec"
"time"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/builder_utils"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/go-paths-helper"
"github.com/go-errors/errors"
......
......@@ -30,10 +30,10 @@
package builder
import (
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/libraries"
)
type FailIfImportedLibraryIsWrong struct{}
......
......@@ -30,9 +30,9 @@
package builder
import (
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
)
type HardwareLoader struct{}
......
......@@ -23,9 +23,9 @@ func UnwrapError(err error) error {
// Perhaps go-errors can do this already in later versions?
// See https://github.com/go-errors/errors/issues/14
switch e := err.(type) {
case *errors.Error:
return e.Err
default:
return err
case *errors.Error:
return e.Err
default:
return err
}
}
......@@ -32,11 +32,11 @@ package builder
import (
"os"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/arduino/libraries/librariesmanager"
"github.com/arduino/arduino-cli/arduino/libraries/librariesresolver"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
)
type LibrariesLoader struct{}
......
......@@ -33,12 +33,12 @@ import (
"path/filepath"
"strings"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/builder_utils"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/go-paths-helper"
"github.com/arduino/go-properties-orderedmap"
)
......
......@@ -32,9 +32,9 @@ package builder
import (
"fmt"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/libraries"
)
func ResolveLibrary(ctx *types.Context, header string) *libraries.Library {
......
......@@ -30,9 +30,9 @@
package builder
import (
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
)
type RewriteHardwareKeys struct{}
......
......@@ -36,9 +36,9 @@ import (
"strings"
"time"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/arduino-cli/arduino/cores"
properties "github.com/arduino/go-properties-orderedmap"
timeutils "github.com/arduino/go-timeutils"
)
......
......@@ -33,9 +33,9 @@ import (
"path/filepath"
"testing"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require"
)
......
......@@ -37,10 +37,10 @@ import (
"testing"
"text/template"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/arduino-cli/arduino/libraries"
paths "github.com/arduino/go-paths-helper"
"github.com/go-errors/errors"
"github.com/stretchr/testify/assert"
......
......@@ -34,10 +34,10 @@ import (
"sort"
"testing"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/libraries"
paths "github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require"
)
......
......@@ -32,9 +32,9 @@ package test
import (
"testing"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
properties "github.com/arduino/go-properties-orderedmap"
"github.com/stretchr/testify/require"
)
......
......@@ -33,9 +33,9 @@ import (
"sort"
"testing"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
paths "github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require"
)
......
......@@ -32,9 +32,9 @@ package test
import (
"testing"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/libraries"
paths "github.com/arduino/go-paths-helper"
"github.com/stretchr/testify/require"
)
......
......@@ -109,8 +109,8 @@ func TestMapTrimSpace(t *testing.T) {
func TestQuoteCppString(t *testing.T) {
cases := map[string]string{
`foo`: `"foo"`,
`foo\bar`: `"foo\\bar"`,
`foo`: `"foo"`,
`foo\bar`: `"foo\\bar"`,
`foo "is" quoted and \\bar"" escaped\`: `"foo \"is\" quoted and \\\\bar\"\" escaped\\"`,
// ASCII 0x20 - 0x7e, excluding `
` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~`: `" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_abcdefghijklmnopqrstuvwxyz{|}~"`,
......
......@@ -4,12 +4,12 @@ import (
"io"
"strings"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/arduino/libraries/librariesmanager"
"github.com/arduino/arduino-cli/arduino/libraries/librariesresolver"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
paths "github.com/arduino/go-paths-helper"
properties "github.com/arduino/go-properties-orderedmap"
)
......
......@@ -30,10 +30,10 @@
package builder
import (
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/legacy/builder/i18n"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/legacy/builder/utils"
"github.com/arduino/arduino-cli/arduino/libraries"
)
type UnusedCompiledLibrariesRemover struct{}
......
......@@ -32,9 +32,9 @@ package builder
import (
"os"
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/legacy/builder/constants"
"github.com/arduino/arduino-cli/legacy/builder/types"
"github.com/arduino/arduino-cli/arduino/cores"
)
type WarnAboutPlatformRewrites struct{}
......
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