mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-13 06:40:41 +00:00
fix golangci-lint error
This commit is contained in:
+1
-1
@@ -170,7 +170,7 @@ func apiFilesListFiles(c *gin.Context) {
|
|||||||
listLock := &sync.Mutex{}
|
listLock := &sync.Mutex{}
|
||||||
root := filepath.Join(context.UploadPath(), utils.SanitizePath(c.Params.ByName("dir")))
|
root := filepath.Join(context.UploadPath(), utils.SanitizePath(c.Params.ByName("dir")))
|
||||||
|
|
||||||
err := walker.Walk(root, func(path string, info os.FileInfo) error {
|
err := walker.Walk(root, func(path string, _ os.FileInfo) error {
|
||||||
if path == root {
|
if path == root {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -254,7 +254,7 @@ func apiSnapshotsCreateFromRepository(c *gin.Context) {
|
|||||||
// including snapshot resource key
|
// including snapshot resource key
|
||||||
resources := []string{string(repo.Key()), "S" + b.Name}
|
resources := []string{string(repo.Key()), "S" + b.Name}
|
||||||
taskName := fmt.Sprintf("Create snapshot of repo %s", name)
|
taskName := fmt.Sprintf("Create snapshot of repo %s", name)
|
||||||
maybeRunTaskInBackground(c, taskName, resources, func(out aptly.Progress, detail *task.Detail) (*task.ProcessReturnValue, error) {
|
maybeRunTaskInBackground(c, taskName, resources, func(_ aptly.Progress, _ *task.Detail) (*task.ProcessReturnValue, error) {
|
||||||
err := collection.LoadComplete(repo, collectionFactory.RefListCollection())
|
err := collection.LoadComplete(repo, collectionFactory.RefListCollection())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
|
return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, err
|
||||||
|
|||||||
Reference in New Issue
Block a user