MCPcopy Index your code
hub / github.com/databus23/helm-diff / checkArgsLength

Function checkArgsLength

cmd/helm.go:57–67  ·  view source on GitHub ↗

Source: cmd/helm/helm.go

(argsReceived int, requiredArgs ...string)

Source from the content-addressed store, hash-verified

55// Source: cmd/helm/helm.go
56
57func checkArgsLength(argsReceived int, requiredArgs ...string) error {
58 expectedNum := len(requiredArgs)
59 if argsReceived != expectedNum {
60 arg := "arguments"
61 if expectedNum == 1 {
62 arg = "argument"
63 }
64 return fmt.Errorf("This command needs %v %s: %s", expectedNum, arg, strings.Join(requiredArgs, ", "))
65 }
66 return nil
67}
68
69var (
70 helmVersionRE = regexp.MustCompile(`Version:\s*"([^"]+)"`)

Callers 3

localCmdFunction · 0.85
newChartCommandFunction · 0.85
rollbackCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected