MCPcopy Create free account
hub / github.com/libgit2/git2go / main

Function main

script/check-MakeGitError-thread-lock.go:23–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21)
22
23func main() {
24 log.SetFlags(0)
25
26 bpkg, err := build.ImportDir(".", 0)
27 if err != nil {
28 log.Fatal(err)
29 }
30
31 pkgs, err := parser.ParseDir(fset, bpkg.Dir, func(fi os.FileInfo) bool { return filepath.Ext(fi.Name()) == ".go" }, 0)
32 if err != nil {
33 log.Fatal(err)
34 }
35
36 for _, pkg := range pkgs {
37 if err := checkPkg(pkg); err != nil {
38 log.Fatal(err)
39 }
40 }
41 if len(pkgs) == 0 {
42 log.Fatal("No packages to check.")
43 }
44}
45
46var ignoreViolationsInFunc = map[string]bool{
47 "MakeGitError": true,

Callers

nothing calls this directly

Calls 2

checkPkgFunction · 0.85
NameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…