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

Method DisplayEntries

pkg/cmdutil/usage.go:99–111  ·  view source on GitHub ↗
(out io.Writer)

Source from the content-addressed store, hash-verified

97}
98
99func (u *UsageEntries) DisplayEntries(out io.Writer) {
100 for _, e := range u.entries {
101 if e.Title != "" {
102 // If there is a title, add indentation to each line in the body
103 fmt.Fprintln(out, e.Title)
104 fmt.Fprintln(out, text.Indent(strings.Trim(e.Body, "\r\n"), " "))
105 } else {
106 // If there is no title print the body as is
107 fmt.Fprintln(out, e.Body)
108 }
109 fmt.Fprintln(out)
110 }
111}
112
113func UsageFunc(
114 IOStreams *iostreams.IOStreams,

Callers 4

UsageFuncFunction · 0.95
rootHelpFuncFunction · 0.95

Calls 1

IndentFunction · 0.92

Tested by

no test coverage detected