MCPcopy
hub / github.com/larksuite/cli / hasGoMod

Function hasGoMod

lint/errscontract/scan.go:263–266  ·  view source on GitHub ↗

hasGoMod reports whether the given directory contains a go.mod file at its root. Used to scope the typed-resolution advisory to repos that look like Go workspaces; unit-test fixtures without go.mod stay silent.

(root string)

Source from the content-addressed store, hash-verified

261// its root. Used to scope the typed-resolution advisory to repos that look
262// like Go workspaces; unit-test fixtures without go.mod stay silent.
263func hasGoMod(root string) bool {
264 _, err := os.Stat(filepath.Join(root, "go.mod"))
265 return err == nil
266}
267
268// isErrsScope reports whether a path is inside the errs/ package (including
269// any subpackage). Used to scope-out CheckDeclaredSubtype from the package

Callers 1

ScanRepoWithOptionsFunction · 0.85

Calls 1

StatMethod · 0.65

Tested by

no test coverage detected