0

I am using go version go1.10.3 darwin/amd64 with glide version v0.13.1 Project is located at /Users/robopuff/Development/GoRethink and it's tree looks like this:

.
├── glide.lock
├── glide.yaml
├── main.go
├── rethinkdb_data
│   ├── 001fbc34-bd63-445f-8590-709ac7475294
│   ├── log_file
│   ├── metadata
│   └── tmp
└── vendor
    ├── github.com
    │   ├── cenkalti
    │   │   └── backoff
    │   ├── golang
    │   │   └── protobuf
    │   ├── hailocab
    │   │   └── go-hostpool
    │   ├── opentracing
    │   │   └── opentracing-go
    │   └── sirupsen
    │       └── logrus
    ├── golang.org
    │   └── x
    │       ├── crypto
    │       ├── net
    │       └── sys
    └── gopkg.in
        ├── fatih
        │   └── pool.v2
        └── gorethink
            └── gorethink.v4

After running go run main.go I am welcomed with an error

❯ go run main.go
main.go:7:2: cannot find package "gopkg.in/gorethink/gorethink.v4" in any of:
    /usr/local/go/src/gopkg.in/gorethink/gorethink.v4 (from $GOROOT)
    /Users/robopuff/go/src/gopkg.in/gorethink/gorethink.v4 (from $GOPATH)

Shouldn't go compiler first of all look at vendor?

retest
  • 9
  • 1
  • 3
  • 3
    You said your project is located at `/Users/robopuff/Development/GoRethink` but per the error message, that's not in your GOPATH. – Adrian Aug 08 '18 at 16:25
  • Even when I change to a `GOPATH=/Users/robopuff/Development/GoRethink go run main.go` result is the same – retest Aug 08 '18 at 19:19
  • That's still invalid. GOPATH needs to contain a folder `src` which can contain your projects. A quick search for GOPATH should yield all the info you need. – Adrian Aug 08 '18 at 19:22

1 Answers1

-1

The proper answer for that one is to read through Docs, especially Workspaces and understand it.

retest
  • 9
  • 1
  • 3