MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / pbAnnotationsToAction

Function pbAnnotationsToAction

app/cli/pkg/action/attestation_status.go:313–324  ·  view source on GitHub ↗
(in []*pbc.Annotation)

Source from the content-addressed store, hash-verified

311}
312
313func pbAnnotationsToAction(in []*pbc.Annotation) []*Annotation {
314 res := make([]*Annotation, 0, len(in))
315
316 for _, a := range in {
317 res = append(res, &Annotation{
318 Name: a.GetName(),
319 Value: a.GetValue(),
320 })
321 }
322
323 return res
324}
325
326// stateAnnotationToAction converts the map of annotations to a slice of []*Annotation
327func stateAnnotationToAction(in map[string]string) []*Annotation {

Callers 2

RunMethod · 0.85

Calls 2

GetNameMethod · 0.65
GetValueMethod · 0.45

Tested by

no test coverage detected