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

Function CheckIfError

_examples/common.go:19–26  ·  view source on GitHub ↗

CheckIfError should be used to naively panics if an error is not nil.

(err error)

Source from the content-addressed store, hash-verified

17
18// CheckIfError should be used to naively panics if an error is not nil.
19func CheckIfError(err error) {
20 if err == nil {
21 return
22 }
23
24 fmt.Printf("\x1b[31;1m%s\x1b[0m\n", fmt.Sprintf("error: %s", err))
25 os.Exit(1)
26}
27
28// Info should be used to describe the example commands that are about to run.
29func Info(format string, args ...interface{}) {

Callers 15

tempFolderFunction · 0.85
cloneRepositoryFunction · 0.85
createRepositoryFunction · 0.85
setRemoteFunction · 0.85
addRemoteFunction · 0.85
deleteTempFoldersFunction · 0.85
mainFunction · 0.85
prepareRepoFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

PrintfMethod · 0.80

Tested by 6

tempFolderFunction · 0.68
cloneRepositoryFunction · 0.68
createRepositoryFunction · 0.68
setRemoteFunction · 0.68
addRemoteFunction · 0.68
deleteTempFoldersFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…