MCPcopy Create free account
hub / github.com/docker/docker-language-server / isCobraError

Function isCobraError

internal/pkg/cli/cli.go:89–94  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

87}
88
89func isCobraError(err error) bool {
90 // Cobra doesn't give us a good way to distinguish between Cobra errors
91 // (e.g. invalid command/args) and app errors, so ignore them manually
92 // to avoid logging out scary stack traces for benign invocation issues
93 return strings.Contains(err.Error(), "unknown flag")
94}

Callers 1

ExecuteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected