Skip to content

Commit 9861c83

Browse files
rimapolagrasth
andauthored
Update artifactory/utils/search.go
Co-authored-by: Agrasth Naman <agrasthn@jfrog.com>
1 parent e5b6e96 commit 9861c83

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

artifactory/utils/search.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ func SearchFiles(servicesManager artifactory.ArtifactoryServicesManager, spec *s
170170
return SearchFilesBySpecific(servicesManager, spec.Files)
171171
}
172172

173-
func SearchFilesBySpecific(servicesManager artifactory.ArtifactoryServicesManager, files []spec.File) (searchResults []*content.ContentReader, callbackFunc func() error, err error) {
173+
// SearchFilesBySpecs performs a search operation using the provided file specifications.
174+
// It supports multiple source types including artifacts, packages, and release bundles.
175+
func SearchFilesBySpecs(servicesManager artifactory.ArtifactoryServicesManager, files []spec.File) (searchResults []*content.ContentReader, callbackFunc func() error, err error) {
176+
if len(files) == 0 {
177+
return nil, nil, errorutils.CheckErrorf("no files provided for search")
178+
}
174179
callbackFunc = func() error {
175180
var errs error
176181
for _, reader := range searchResults {

0 commit comments

Comments
 (0)