MCPcopy Create free account
hub / github.com/PostHog/duckgres / findProjectRoot

Function findProjectRoot

tests/controlplane/controlplane_test.go:60–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60func findProjectRoot() string {
61 // Walk up from the test file to find go.mod
62 dir, _ := os.Getwd()
63 for {
64 if _, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil {
65 return dir
66 }
67 parent := filepath.Dir(dir)
68 if parent == dir {
69 log.Fatal("Could not find project root (go.mod)")
70 }
71 dir = parent
72 }
73}
74
75// ---------------------------------------------------------------------------
76// syncBuffer — thread-safe byte buffer for capturing subprocess logs

Callers 1

TestMainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected