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

Function UsageFunc

pkg/cmdutil/usage.go:113–127  ·  view source on GitHub ↗
(
	IOStreams *iostreams.IOStreams,
	command *cobra.Command,
	flagUsages string,
)

Source from the content-addressed store, hash-verified

111}
112
113func UsageFunc(
114 IOStreams *iostreams.IOStreams,
115 command *cobra.Command,
116 flagUsages string,
117) func(cmd *cobra.Command) error {
118 return func(cmd *cobra.Command) error {
119 entries := UsageEntries{}
120
121 entries.AddBasicUsage(IOStreams, command)
122 entries.AddFlags(IOStreams, command, flagUsages)
123
124 entries.DisplayEntries(IOStreams.Out)
125 return nil
126 }
127}
128
129func UsageFuncDefault(
130 IOStreams *iostreams.IOStreams,

Callers 2

UsageFuncDefaultFunction · 0.85

Calls 3

AddBasicUsageMethod · 0.95
AddFlagsMethod · 0.95
DisplayEntriesMethod · 0.95

Tested by

no test coverage detected