How to solve conflicting GOPATH?

Asked by At

When I run docker-compose up,I have

db/postgres.go:7:2: cannot find package "github.com/lib/pq" in any of:
    /usr/local/go/src/github.com/lib/pq (from $GOROOT)
    /go/src/github.com/lib/pq (from $GOPATH)

I checked and Ipq(and other packages_ are installed at github.com folder.

My path and root

[email protected]:~/go/src/github.com/meower$ echo $GOPATH
/home/jh/go
[email protected]:~/go/src/github.com/meower$ echo $GOROOT
/usr/local/go

Why is my path not recognized?

0 Answers