Fix linter list and fix errors discovered by new staticcheck

This commit is contained in:
Andrey Smirnov committed 2019-01-20 00:01:17 +03:00
1 parent a64807efda
commit 3b5840e248
8 files changed
+9 -23

No files matched your search

+4 -6
View File
@@ -540,12 +540,10 @@ func (repo *RemoteRepo) DownloadPackageIndexes(progress aptly.Progress, d aptly.
}
}
err = repo.packageList.Add(p)
if err != nil {
if _, ok := err.(*PackageConflictError); ok {
progress.ColoredPrintf("@y[!]@| @!skipping package %s: duplicate in packages index@|", p)
} else {
return err
}
if _, ok := err.(*PackageConflictError); ok {
progress.ColoredPrintf("@y[!]@| @!skipping package %s: duplicate in packages index@|", p)
} else if err != nil {
return err
}
}
-1
View File
@@ -5,7 +5,6 @@ import (
)
type VersionSuite struct {
stanza Stanza
}
var _ = Suite(&VersionSuite{})