mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
Remove unused error argument.
This commit is contained in:
@@ -315,12 +315,7 @@ func apiReposPackageFromDir(c *gin.Context) {
|
|||||||
sources = []string{filepath.Join(context.UploadPath(), c.Params.ByName("dir"), c.Params.ByName("file"))}
|
sources = []string{filepath.Join(context.UploadPath(), c.Params.ByName("dir"), c.Params.ByName("file"))}
|
||||||
}
|
}
|
||||||
|
|
||||||
packageFiles, failedFiles, err = deb.CollectPackageFiles(sources, reporter)
|
packageFiles, failedFiles = deb.CollectPackageFiles(sources, reporter)
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
c.Fail(500, fmt.Errorf("unable to collect package files: %s", err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
list, err = deb.NewPackageListFromRefList(repo.RefList(), context.CollectionFactory().PackageCollection(), nil)
|
list, err = deb.NewPackageListFromRefList(repo.RefList(), context.CollectionFactory().PackageCollection(), nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -42,10 +42,7 @@ func aptlyRepoAdd(cmd *commander.Command, args []string) error {
|
|||||||
|
|
||||||
var packageFiles, failedFiles []string
|
var packageFiles, failedFiles []string
|
||||||
|
|
||||||
packageFiles, failedFiles, err = deb.CollectPackageFiles(args[1:], &aptly.ConsoleResultReporter{Progress: context.Progress()})
|
packageFiles, failedFiles = deb.CollectPackageFiles(args[1:], &aptly.ConsoleResultReporter{Progress: context.Progress()})
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("unable to collect package files: %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
var processedFiles, failedFiles2 []string
|
var processedFiles, failedFiles2 []string
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// CollectPackageFiles walks filesystem collecting all candidates for package files
|
// CollectPackageFiles walks filesystem collecting all candidates for package files
|
||||||
func CollectPackageFiles(locations []string, reporter aptly.ResultReporter) (packageFiles, failedFiles []string, err error) {
|
func CollectPackageFiles(locations []string, reporter aptly.ResultReporter) (packageFiles, failedFiles []string) {
|
||||||
for _, location := range locations {
|
for _, location := range locations {
|
||||||
info, err2 := os.Stat(location)
|
info, err2 := os.Stat(location)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user