mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-25 13:37:51 +00:00
Fix linting errors
This commit is contained in:
@@ -189,6 +189,9 @@ func aptlyDbCleanup(cmd *commander.Command, args []string) error {
|
|||||||
err = toDelete.ForEach(func(ref []byte) error {
|
err = toDelete.ForEach(func(ref []byte) error {
|
||||||
return collectionFactory.PackageCollection().DeleteByKey(ref, batch)
|
return collectionFactory.PackageCollection().DeleteByKey(ref, batch)
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("unable to delete by key: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
err = batch.Write()
|
err = batch.Write()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ func aptlyMirrorShowJSON(cmd *commander.Command, args []string) error {
|
|||||||
if repo.RefList() != nil {
|
if repo.RefList() != nil {
|
||||||
var list *deb.PackageList
|
var list *deb.PackageList
|
||||||
list, err = deb.NewPackageListFromRefList(repo.RefList(), context.NewCollectionFactory().PackageCollection(), context.Progress())
|
list, err = deb.NewPackageListFromRefList(repo.RefList(), context.NewCollectionFactory().PackageCollection(), context.Progress())
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("unable to get package list: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
list.PrepareIndex()
|
list.PrepareIndex()
|
||||||
list.ForEachIndexed(func(p *deb.Package) error {
|
list.ForEachIndexed(func(p *deb.Package) error {
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ func aptlySnapshotShowJSON(cmd *commander.Command, args []string) error {
|
|||||||
if snapshot.RefList() != nil {
|
if snapshot.RefList() != nil {
|
||||||
var list *deb.PackageList
|
var list *deb.PackageList
|
||||||
list, err = deb.NewPackageListFromRefList(snapshot.RefList(), context.NewCollectionFactory().PackageCollection(), context.Progress())
|
list, err = deb.NewPackageListFromRefList(snapshot.RefList(), context.NewCollectionFactory().PackageCollection(), context.Progress())
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("unable to get package list: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
list.PrepareIndex()
|
list.PrepareIndex()
|
||||||
list.ForEachIndexed(func(p *deb.Package) error {
|
list.ForEachIndexed(func(p *deb.Package) error {
|
||||||
|
|||||||
+1
-1
@@ -516,7 +516,7 @@ func (context *AptlyContext) GoContextHandleSignals() {
|
|||||||
defer context.Unlock()
|
defer context.Unlock()
|
||||||
|
|
||||||
// Catch ^C
|
// Catch ^C
|
||||||
sigch := make(chan os.Signal)
|
sigch := make(chan os.Signal, 1)
|
||||||
signal.Notify(sigch, os.Interrupt)
|
signal.Notify(sigch, os.Interrupt)
|
||||||
|
|
||||||
var cancel gocontext.CancelFunc
|
var cancel gocontext.CancelFunc
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build go1.7
|
||||||
// +build go1.7
|
// +build go1.7
|
||||||
|
|
||||||
package http
|
package http
|
||||||
|
|||||||
+2
-1
@@ -2,8 +2,9 @@ package task
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/aptly-dev/aptly/aptly"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/aptly-dev/aptly/aptly"
|
||||||
)
|
)
|
||||||
|
|
||||||
// List is handling list of processes and makes sure
|
// List is handling list of processes and makes sure
|
||||||
|
|||||||
+2
-1
@@ -1,8 +1,9 @@
|
|||||||
package task
|
package task
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/aptly-dev/aptly/aptly"
|
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
|
"github.com/aptly-dev/aptly/aptly"
|
||||||
)
|
)
|
||||||
|
|
||||||
// State task is in
|
// State task is in
|
||||||
|
|||||||
Reference in New Issue
Block a user