mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
7ad96ee686
* including a artifact cpe type * removing type kind related to PR 3717 * clean up * eliminating local path * go formatting fix Co-authored-by: anilkeshav27 <you@example.com>
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
|
|
}
|