Skip to content

Commit

Permalink
Use utils.GOPATH to get GOPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Nov 2, 2017
1 parent 6b19c55 commit 011e180
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"path"
"path/filepath"
"strings"

"github.com/qor/qor/utils"
)

func main() {
Expand Down Expand Up @@ -39,7 +41,7 @@ func main() {
}

hasExists := false
for _, gopath := range strings.Split(os.Getenv("GOPATH"), string(os.PathListSeparator)) {
for _, gopath := range utils.GOPATH() {
sourcePath := filepath.Join(gopath, "src/github.com/qor/bindatafs/templates")
_, err := os.Stat(sourcePath)
if err == nil {
Expand Down

0 comments on commit 011e180

Please sign in to comment.