You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
366 B
Go
21 lines
366 B
Go
package pb
|
|
|
|
func CreateAttestations(attests []*Attest) map[string]*string {
|
|
result := map[string]*string{}
|
|
for _, attest := range attests {
|
|
// ignore duplicates
|
|
if _, ok := result[attest.Type]; ok {
|
|
continue
|
|
}
|
|
|
|
if attest.Disabled {
|
|
result[attest.Type] = nil
|
|
continue
|
|
}
|
|
|
|
attrs := attest.Attrs
|
|
result[attest.Type] = &attrs
|
|
}
|
|
return result
|
|
}
|