Skip to content

Commit

Permalink
Add build/srcroot.go, a helper to interrogate module location.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Jul 11, 2024
1 parent bcdedbf commit 1eac2aa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/srcroot.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package blst

import (
"path/filepath"
"runtime"
)

var SrcRoot string

func init() {
if _, self, _, ok := runtime.Caller(0); ok {
SrcRoot = filepath.Dir(filepath.Dir(self))
}
}

0 comments on commit 1eac2aa

Please sign in to comment.