diff --git a/current.go b/current.go new file mode 100644 index 0000000..957577d --- /dev/null +++ b/current.go @@ -0,0 +1,12 @@ +package here + +import "path/filepath" + +var root = func() string { + b, _ := run("go", "env", "GOMOD") + return filepath.Dir(string(b)) +}() + +func Current() (Info, error) { + return Dir(root) +} diff --git a/version.go b/version.go index 8c4f4e2..114ae5c 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package here // Version of here -const Version = "v0.2.1" +const Version = "v0.2.2"