MCPcopy Create free account
hub / github.com/basecamp/hey-cli / usageMinOneArg

Function usageMinOneArg

internal/cmd/args.go:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func usageMinOneArg() cobra.PositionalArgs {
37 return func(cmd *cobra.Command, args []string) error {
38 if len(args) >= 1 {
39 return nil
40 }
41
42 return usageErrorf("%s", cleanUseLine(cmd.UseLine()))
43 }
44}
45
46func cleanUseLine(useLine string) string {
47 return strings.TrimSpace(strings.TrimSuffix(useLine, " [flags]"))

Callers 2

newSeenCommandFunction · 0.85
newUnseenCommandFunction · 0.85

Calls 2

usageErrorfFunction · 0.85
cleanUseLineFunction · 0.85

Tested by

no test coverage detected