diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2017-05-09 22:00:15 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2017-05-09 22:00:15 +0200 |
| commit | 58a4af83e0caf09744dd698b5be937205b81e733 (patch) | |
| tree | bcb6b4e587baaabce07c67e971e8459445eef367 /pkg/rtree/repo.go | |
| parent | a92faf7689fa01595fd613ddd3880e9c301ed558 (diff) | |
| download | gofu-58a4af83e0caf09744dd698b5be937205b81e733.tar.gz | |
refactor package rtree towards testability
Diffstat (limited to 'pkg/rtree/repo.go')
| -rw-r--r-- | pkg/rtree/repo.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/pkg/rtree/repo.go b/pkg/rtree/repo.go index 636e3a7..790db92 100644 --- a/pkg/rtree/repo.go +++ b/pkg/rtree/repo.go @@ -26,22 +26,8 @@ import ( "strings" "github.com/majewsky/gofu/pkg/cli" - "github.com/majewsky/gofu/pkg/earlyerrors" ) -//RootPath is the directory below which all repositories are located. Its value -//is $GOPATH/src to match the repository layout created by `go get`. -var RootPath string - -func init() { - gopath := os.Getenv("GOPATH") - if gopath == "" { - earlyerrors.Put("$GOPATH is not set (rtree needs the GOPATH variable to know where to look for and place repos)") - } else { - RootPath = filepath.Join(gopath, "src") - } -} - //Repo describes the entry for a repository in the index file. type Repo struct { //CheckoutPath shall be relative to the RootPath. |
