Using Search to retrieve properties as well
Changes as requested by in
@@ -10,6 +10,7 @@ import (
type SearchResult struct {
Path string `json:"path,omitempty"`
+ Properties map[string]string `json:"properties,omitempty"`
}
func Search(searchSpec *spec.SpecFiles, artDetails *config.ArtifactoryDetails) ([]SearchResult, error) {
@@ -45,6 +46,10 @@ func aqlResultToSearchResult(aqlResult []clientutils.ResultItem) (result []Searc
} else {
tempResult.Path = v.Repo + "/" + v.Name
}
+ tempResult.Properties = make(map[string]string, len(v.Properties))
+ for _, prop := range v.Properties {
+ tempResult.Properties[prop.Key] = prop.Value
+ }
result[i] = *tempResult
}
return
