MCPcopy Index your code
hub / github.com/go-git/go-git / CheckArgs

Function CheckArgs

_examples/common.go:11–16  ·  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

9// CheckArgs should be used to ensure the right command line arguments are
10// passed before executing an example.
11func CheckArgs(arg ...string) {
12 if len(os.Args) < len(arg)+1 {
13 Warning("Usage: %s %s", os.Args[0], strings.Join(arg, " "))
14 os.Exit(1)
15 }
16}
17
18// CheckIfError should be used to naively panics if an error is not nil.
19func CheckIfError(err error) {

Callers 15

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

WarningFunction · 0.85
JoinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…