MCPcopy Index your code
hub / github.com/docker/cli / parseFormat

Method parseFormat

cli/command/formatter/formatter.go:85–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83}
84
85func (c *Context) parseFormat() (*template.Template, error) {
86 tmpl, err := templates.Parse(c.Format.templateString())
87 if err != nil {
88 return nil, fmt.Errorf("template parsing error: %w", err)
89 }
90 return tmpl, nil
91}
92
93func (c *Context) postFormat(tmpl *template.Template, subContext SubContext) {
94 out := c.Output

Callers 4

WriteMethod · 0.95
startSubsectionMethod · 0.80
WriteMethod · 0.80
verboseWriteMethod · 0.80

Calls 1

templateStringMethod · 0.80

Tested by

no test coverage detected