Skip to content

Commit 55ca1eb

Browse files
author
Mattia Bertorello
committed
Fixed all the problem reported by gofmt
1 parent 04378a3 commit 55ca1eb

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ linters:
2424
- errcheck
2525
- goconst
2626
- gocyclo
27-
- gofmt
2827
- govet
2928
- ineffassign
3029
- interfacer

arduino/cores/tools_test.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ func TestFlavorCompatibility(t *testing.T) {
5656
Positives []*os
5757
}
5858
tests := []*test{
59-
&test{&Flavor{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
60-
&test{&Flavor{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
61-
&test{&Flavor{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
59+
{&Flavor{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
60+
{&Flavor{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
61+
{&Flavor{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
6262

6363
// Raspberry PI, BBB or other ARM based host
6464
// PI: "arm-linux-gnueabihf"
6565
// Raspbian on PI2: "arm-linux-gnueabihf"
6666
// Ubuntu Mate on PI2: "arm-linux-gnueabihf"
6767
// Debian 7.9 on BBB: "arm-linux-gnueabihf"
6868
// Raspbian on PI Zero: "arm-linux-gnueabihf"
69-
&test{&Flavor{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
69+
{&Flavor{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
7070
// Arch-linux on PI2: "armv7l-unknown-linux-gnueabihf"
71-
&test{&Flavor{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
71+
{&Flavor{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
7272

73-
&test{&Flavor{OS: "i686-linux-gnu"}, []*os{linuxi386}},
74-
&test{&Flavor{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
75-
&test{&Flavor{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
76-
&test{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
73+
{&Flavor{OS: "i686-linux-gnu"}, []*os{linuxi386}},
74+
{&Flavor{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
75+
{&Flavor{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
76+
{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
7777
}
7878

7979
check := func(test *test, os *os) {

commands/compile/ctags.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
2929
ctagsTool := builtinPackage.GetOrCreateTool("ctags")
3030
ctagsRel := ctagsTool.GetOrCreateRelease(semver.ParseRelaxed("5.8-arduino11"))
3131
ctagsRel.Flavors = []*cores.Flavor{
32-
&cores.Flavor{
32+
{
3333
OS: "i686-pc-linux-gnu",
3434
Resource: &resources.DownloadResource{
3535
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-pc-linux-gnu.tar.bz2",
@@ -39,7 +39,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
3939
CachePath: "tools",
4040
},
4141
},
42-
&cores.Flavor{
42+
{
4343
OS: "x86_64-pc-linux-gnu",
4444
Resource: &resources.DownloadResource{
4545
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-pc-linux-gnu.tar.bz2",
@@ -49,7 +49,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
4949
CachePath: "tools",
5050
},
5151
},
52-
&cores.Flavor{
52+
{
5353
OS: "i686-mingw32",
5454
Resource: &resources.DownloadResource{
5555
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-mingw32.zip",
@@ -59,7 +59,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
5959
CachePath: "tools",
6060
},
6161
},
62-
&cores.Flavor{
62+
{
6363
OS: "x86_64-apple-darwin",
6464
Resource: &resources.DownloadResource{
6565
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-apple-darwin.zip",
@@ -69,7 +69,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
6969
CachePath: "tools",
7070
},
7171
},
72-
&cores.Flavor{
72+
{
7373
OS: "arm-linux-gnueabihf",
7474
Resource: &resources.DownloadResource{
7575
ArchiveFileName: "ctags-5.8-arduino11-pm-armv6-linux-gnueabihf.tar.bz2",

commands/sketch/sync.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ func findPathOf(sketchName string, path string) string {
400400
for i := len(list) - 1; i > -1; i-- {
401401
//fmt.Println(list[i], "==", sketchName, "?", list[i] == sketchName)
402402
if list[i] == sketchName {
403-
return filepath.Join(list[i+1 : len(list)]...)
403+
return filepath.Join(list[i+1:]...)
404404
}
405405
}
406406
return ""

0 commit comments

Comments
 (0)