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

Function prettyPrintVersion

cli/command/system/version.go:232–238  ·  view source on GitHub ↗
(out io.Writer, vd versionInfo, tmpl *template.Template)

Source from the content-addressed store, hash-verified

230}
231
232func prettyPrintVersion(out io.Writer, vd versionInfo, tmpl *template.Template) error {
233 t := tabwriter.NewWriter(out, 20, 1, 1, ' ', 0)
234 err := tmpl.Execute(t, vd)
235 _, _ = t.Write([]byte("\n"))
236 _ = t.Flush()
237 return err
238}
239
240func newVersionTemplate(templateFormat string) (*template.Template, error) {
241 switch templateFormat {

Callers 2

TestVersionFormatFunction · 0.85
runVersionFunction · 0.85

Calls 2

WriteMethod · 0.95
FlushMethod · 0.95

Tested by 1

TestVersionFormatFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…