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

Function UsageFuncWithInheritedFlagsOnly

pkg/cmdutil/usage.go:162–174  ·  view source on GitHub ↗
(
	IOStreams *iostreams.IOStreams,
	command *cobra.Command,
)

Source from the content-addressed store, hash-verified

160}
161
162func UsageFuncWithInheritedFlagsOnly(
163 IOStreams *iostreams.IOStreams,
164 command *cobra.Command,
165) func(cmd *cobra.Command) error {
166 return func(cmd *cobra.Command) error {
167 entries := UsageEntries{}
168 entries.AddBasicUsage(IOStreams, command)
169 entries.AddInheritedFlags(IOStreams, command)
170
171 entries.DisplayEntries(IOStreams.Out)
172 return nil
173 }
174}
175
176func Dedent(s string) string {
177 lines := strings.Split(s, "\n")

Callers 1

NewBrowseCmdFunction · 0.92

Calls 3

AddBasicUsageMethod · 0.95
AddInheritedFlagsMethod · 0.95
DisplayEntriesMethod · 0.95

Tested by

no test coverage detected