mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
b3f37650a2
* Fix docs and format * Assessment format added * Added sample file * Added parsing * Added packageurl implementation * Slight refinement * Refactored assessment options * Adapted sample file * First attempt of ws sbom gen * Reworked SBOM generation * Fix test code * Add assessment handling * Update dependencies * Added golden test * Small fix Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
19 lines
353 B
Go
19 lines
353 B
Go
package piperutils
|
|
|
|
func Keys[M ~map[K]V, K comparable, V any](m M) []K {
|
|
r := make([]K, 0, len(m))
|
|
for k := range m {
|
|
r = append(r, k)
|
|
}
|
|
return r
|
|
}
|
|
|
|
//Values returns the slice of values of the map provided
|
|
func Values[M ~map[K]V, K comparable, V any](m M) []V {
|
|
r := make([]V, 0, len(m))
|
|
for _, v := range m {
|
|
r = append(r, v)
|
|
}
|
|
return r
|
|
}
|