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

Function signerInfoWrite

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

signerInfoWrite writes the context.

(fmtCtx formatter.Context, signerInfoList []signerInfo)

Source from the content-addressed store, hash-verified

79
80// signerInfoWrite writes the context.
81func signerInfoWrite(fmtCtx formatter.Context, signerInfoList []signerInfo) error {
82 signerInfoCtx := &signerInfoContext{
83 HeaderContext: formatter.HeaderContext{
84 Header: formatter.SubHeaderContext{
85 "Signer": signerNameHeader,
86 "Keys": keysHeader,
87 },
88 },
89 }
90 return fmtCtx.Write(signerInfoCtx, func(format func(subContext formatter.SubContext) error) error {
91 for _, info := range signerInfoList {
92 if err := format(&signerInfoContext{
93 trunc: fmtCtx.Trunc,
94 s: info,
95 }); err != nil {
96 return err
97 }
98 }
99 return nil
100 })
101}
102
103type signerInfoContext struct {
104 formatter.HeaderContext

Callers 3

printSignerInfoFunction · 0.85

Calls 2

formatFunction · 0.85
WriteMethod · 0.45

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…