MCPcopy Create free account
hub / github.com/algolia/cli / Print

Method Print

pkg/cmdutil/print_flags.go:95–101  ·  view source on GitHub ↗

Print renders a value with the configured printer.

(ios *iostreams.IOStreams, value interface{})

Source from the content-addressed store, hash-verified

93
94// Print renders a value with the configured printer.
95func (f *PrintFlags) Print(ios *iostreams.IOStreams, value interface{}) error {
96 p, err := f.ToPrinter()
97 if err != nil {
98 return err
99 }
100 return p.Print(ios, value)
101}
102
103func (f *PrintFlags) AddFlags(cmd *cobra.Command) {
104 f.JSONPrintFlags.AddFlags(cmd)

Callers

nothing calls this directly

Calls 2

ToPrinterMethod · 0.95
PrintMethod · 0.65

Tested by

no test coverage detected