Files

14 lines
302 B
Go

package main
import (
"path/filepath"
"runtime"
)
// projectRoot returns the absolute path to the repository root,
// derived from the compile-time source file location.
func projectRoot() string {
_, thisFile, _, _ := runtime.Caller(0)
return filepath.Join(filepath.Dir(thisFile), "..", "..")
}