Skip to content

Commit

Permalink
mod path
Browse files Browse the repository at this point in the history
  • Loading branch information
urtho committed Sep 5, 2022
1 parent b758787 commit 2d09be2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plgo/modulewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,18 @@ func readPlGoSource() ([]byte, error) {
goPath = build.Default.GOPATH // Go 1.8 and later have a default GOPATH
}
for _, goPathElement := range filepath.SplitList(goPath) {
path := filepath.Join(goPathElement, "src", "gitlab.com", "microo8", "plgo", "pl.go")
path := filepath.Join(goPathElement, "src", "github.com", "algonode", "plgo", "pl.go")
if _, err := os.Stat(path); err == nil {
found = path
break
}
}
if found == "" {
version, err := versionInfo("gitlab.com/microo8/plgo")
version, err := versionInfo("github.com/algonode/plgo")
if err != nil {
return nil, err
}
pathEnd := filepath.Join("pkg", "mod", "gitlab.com", "microo8", "plgo@"+version, "pl.go")
pathEnd := filepath.Join("pkg", "mod", "github.com", "algonode", "plgo@"+version, "pl.go")
cache, ok := os.LookupEnv("GOMODCACHE")
if ok {
path := filepath.Join(cache, pathEnd)
Expand Down

0 comments on commit 2d09be2

Please sign in to comment.