MCPcopy
hub / github.com/docker/compose / PrintPrettySection

Function PrintPrettySection

cmd/formatter/pretty.go:27–32  ·  view source on GitHub ↗

PrintPrettySection prints a tabbed section on the writer parameter

(out io.Writer, printer func(writer io.Writer), headers ...string)

Source from the content-addressed store, hash-verified

25
26// PrintPrettySection prints a tabbed section on the writer parameter
27func PrintPrettySection(out io.Writer, printer func(writer io.Writer), headers ...string) error {
28 w := tabwriter.NewWriter(out, 20, 1, 3, ' ', 0)
29 _, _ = fmt.Fprintln(w, strings.Join(headers, "\t"))
30 printer(w)
31 return w.Flush()
32}

Callers 1

PrintFunction · 0.85

Calls 1

printerStruct · 0.85

Tested by

no test coverage detected