1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-16 11:09:33 +02:00
sap-jenkins-library/pkg/piperenv/artifact.go

19 lines
314 B
Go
Raw Normal View History

package piperenv
type Artifact struct {
Name string `json:"name,omitempty"`
}
type Artifacts []Artifact
func (a Artifacts) FindByName(name string) Artifacts {
var filtered Artifacts
for _, artifact := range a {
if artifact.Name == name {
filtered = append(filtered, artifact)
}
}
return filtered
}