mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
fix: resolve golangci-lint failures in jfrog storage implementation
- Remove unused pathCache field from PublishedStorage struct - Remove unused md5s accumulation in Filelist() - Fix unchecked error return on expectedOut.Write in config_test.go - Suppress unused linter on configFileYAML/configFileYAMLError constants (retained to avoid merge conflicts with feat/pls/gcs-support) - Add --timeout=10m to golangci-lint workflow - add back removed tests
This commit is contained in:
committed by
André Roth
parent
4b8f0c42ac
commit
214c151194
+3
-6
@@ -21,7 +21,6 @@ type PublishedStorage struct {
|
||||
repository string
|
||||
prefix string
|
||||
plusWorkaround bool
|
||||
pathCache map[string]string
|
||||
}
|
||||
|
||||
// Check interface
|
||||
@@ -138,16 +137,14 @@ func (storage *PublishedStorage) Filelist(prefix string) ([]string, error) {
|
||||
defer reader.Close()
|
||||
|
||||
var paths []string
|
||||
var md5s []string
|
||||
|
||||
|
||||
for element := new(utils.ResultItem); reader.NextRecord(element) == nil; element = new(utils.ResultItem) {
|
||||
path := element.Path + "/" + element.Name
|
||||
relPath := strings.TrimPrefix(path, storage.repository + "/" + storage.prefix + "/")
|
||||
relPath := strings.TrimPrefix(path, storage.repository+"/"+storage.prefix+"/")
|
||||
if storage.plusWorkaround {
|
||||
relPath = strings.Replace(relPath, "%2B", "+", -1)
|
||||
relPath = strings.Replace(relPath, "%2B", "+", -1)
|
||||
}
|
||||
paths = append(paths, relPath)
|
||||
md5s = append(md5s, element.Actual_Md5)
|
||||
}
|
||||
|
||||
return paths, nil
|
||||
|
||||
Reference in New Issue
Block a user