Commit c244d866 authored by Mattia Bertorello's avatar Mattia Bertorello

Fixed all the problem reported by gofmt

parent e0009794
......@@ -24,7 +24,6 @@ linters:
- errcheck
- goconst
- gocyclo
- gofmt
- govet
- ineffassign
- interfacer
......
......@@ -56,9 +56,9 @@ func TestFlavorCompatibility(t *testing.T) {
Positives []*os
}
tests := []*test{
&test{&Flavor{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
&test{&Flavor{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
&test{&Flavor{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
{&Flavor{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
{&Flavor{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
{&Flavor{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
// Raspberry PI, BBB or other ARM based host
// PI: "arm-linux-gnueabihf"
......@@ -66,14 +66,14 @@ func TestFlavorCompatibility(t *testing.T) {
// Ubuntu Mate on PI2: "arm-linux-gnueabihf"
// Debian 7.9 on BBB: "arm-linux-gnueabihf"
// Raspbian on PI Zero: "arm-linux-gnueabihf"
&test{&Flavor{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
{&Flavor{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
// Arch-linux on PI2: "armv7l-unknown-linux-gnueabihf"
&test{&Flavor{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
{&Flavor{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
&test{&Flavor{OS: "i686-linux-gnu"}, []*os{linuxi386}},
&test{&Flavor{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
&test{&Flavor{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
&test{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
{&Flavor{OS: "i686-linux-gnu"}, []*os{linuxi386}},
{&Flavor{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
{&Flavor{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
}
check := func(test *test, os *os) {
......
......@@ -29,7 +29,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
ctagsTool := builtinPackage.GetOrCreateTool("ctags")
ctagsRel := ctagsTool.GetOrCreateRelease(semver.ParseRelaxed("5.8-arduino11"))
ctagsRel.Flavors = []*cores.Flavor{
&cores.Flavor{
{
OS: "i686-pc-linux-gnu",
Resource: &resources.DownloadResource{
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-pc-linux-gnu.tar.bz2",
......@@ -39,7 +39,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
CachePath: "tools",
},
},
&cores.Flavor{
{
OS: "x86_64-pc-linux-gnu",
Resource: &resources.DownloadResource{
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-pc-linux-gnu.tar.bz2",
......@@ -49,7 +49,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
CachePath: "tools",
},
},
&cores.Flavor{
{
OS: "i686-mingw32",
Resource: &resources.DownloadResource{
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-mingw32.zip",
......@@ -59,7 +59,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
CachePath: "tools",
},
},
&cores.Flavor{
{
OS: "x86_64-apple-darwin",
Resource: &resources.DownloadResource{
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-apple-darwin.zip",
......@@ -69,7 +69,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
CachePath: "tools",
},
},
&cores.Flavor{
{
OS: "arm-linux-gnueabihf",
Resource: &resources.DownloadResource{
ArchiveFileName: "ctags-5.8-arduino11-pm-armv6-linux-gnueabihf.tar.bz2",
......
......@@ -400,7 +400,7 @@ func findPathOf(sketchName string, path string) string {
for i := len(list) - 1; i > -1; i-- {
//fmt.Println(list[i], "==", sketchName, "?", list[i] == sketchName)
if list[i] == sketchName {
return filepath.Join(list[i+1 : len(list)]...)
return filepath.Join(list[i+1:]...)
}
}
return ""
......
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