MCPcopy Index your code
hub / github.com/pocketbase/pocketbase / IsProbablyGoRun

Function IsProbablyGoRun

tools/osutils/run.go:11–19  ·  view source on GitHub ↗

IsProbablyGoRun loosely checks if the current program was started with "go run".

()

Source from the content-addressed store, hash-verified

9
10// IsProbablyGoRun loosely checks if the current program was started with "go run".
11func IsProbablyGoRun() bool {
12 for _, dir := range runDirs {
13 if dir != "" && strings.HasPrefix(os.Args[0], dir) {
14 return true
15 }
16 }
17
18 return false
19}
20
21func cacheDir() string {
22 dir := os.Getenv("GOCACHE")

Callers 4

inspectRuntimeFunction · 0.92
executablePathFunction · 0.92
defaultPublicDirFunction · 0.92
TestIsProbablyGoRunFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsProbablyGoRunFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…