I know internet full of similar issues and I tried all of suggested solutions, but can't figure out it at least 2 days.
I trying to deploy little Go server I using IntelliJ IDEA and it works great, it can build/run my code, but if I use terminal as example:
go build ./...
I see something like that:
OS-X-Dennis:backend denis$ go build ./...
out/production/mypocket_backend/server.go:4:2: cannot find package "api.jwt.auth/routers" in any of:
/usr/local/go/src/api.jwt.auth/routers (from $GOROOT)
/Users/denis/Programming/Golang/src/api.jwt.auth/routers (from $GOPATH)
OS X 10.11.2, IntelliJ IDEA 2016.1
$GOPATH = "Users/denis/Programming/Golang"
$GOROOT = "/usr/local/go"
$PATH = "$PATH:$GOPATH/bin"
These paths are correct?
Here is my work structure:
/Golang/
.bin/
.pkg/
.darwin-amd64/
.//other folders/
.src/
.github.com/
.backend/ //project's source
/src
/api.jwt.auth/
//source code
.server.go - file with main func
//other files as example .gitignore
.//other folders//
Here is my screen of main file and whole project-structure:
I see that logs show me wrong path to my project.
now
/Users/denis/Programming/Golang/src/api.jwt.auth/routers
should
/Users/denis/Programming/Golang/src/backend/src/api.jwt.auth/routers
I don't know where I should correct this path.