MCPcopy Create free account
hub / github.com/docker/cli / tagWrite

Function tagWrite

cmd/docker-trust/trust/formatter.go:39–57  ·  view source on GitHub ↗

tagWrite writes the context

(fmtCtx formatter.Context, signedTagInfoList []signedTagInfo)

Source from the content-addressed store, hash-verified

37
38// tagWrite writes the context
39func tagWrite(fmtCtx formatter.Context, signedTagInfoList []signedTagInfo) error {
40 trustTagCtx := &trustTagContext{
41 HeaderContext: formatter.HeaderContext{
42 Header: formatter.SubHeaderContext{
43 "SignedTag": signedTagNameHeader,
44 "Digest": trustedDigestHeader,
45 "Signers": signersHeader,
46 },
47 },
48 }
49 return fmtCtx.Write(trustTagCtx, func(format func(subContext formatter.SubContext) error) error {
50 for _, signedTag := range signedTagInfoList {
51 if err := format(&trustTagContext{s: signedTag}); err != nil {
52 return err
53 }
54 }
55 return nil
56 })
57}
58
59type trustTagContext struct {
60 formatter.HeaderContext

Callers 3

TestTrustTagContextWriteFunction · 0.85
printSignaturesFunction · 0.85

Calls 2

formatFunction · 0.85
WriteMethod · 0.45

Tested by 2

TestTrustTagContextWriteFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…