You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-07-15 01:34:38 +02:00
19 lines
314 B
Go
19 lines
314 B
Go
![]() |
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
|
||
|
}
|