MCPcopy Create free account
hub / github.com/encoder-run/operator / CheckArgs

Function CheckArgs

cmd/repositoryembedder/main.go:667–672  ·  view source on GitHub ↗

CheckArgs should be used to ensure the right command line arguments are passed before executing an example.

(arg ...string)

Source from the content-addressed store, hash-verified

665// CheckArgs should be used to ensure the right command line arguments are
666// passed before executing an example.
667func CheckArgs(arg ...string) {
668 if len(os.Args) < len(arg)+1 {
669 Warning("Usage: %s %s", os.Args[0], strings.Join(arg, " "))
670 os.Exit(1)
671 }
672}
673
674// CheckIfError should be used to naively panics if an error is not nil.
675func CheckIfError(err error) {

Callers

nothing calls this directly

Calls 1

WarningFunction · 0.85

Tested by

no test coverage detected