Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

root project import #1182

Closed
ror6ax opened this issue Sep 19, 2017 · 3 comments · Fixed by #1185
Closed

root project import #1182

ror6ax opened this issue Sep 19, 2017 · 3 comments · Fixed by #1185

Comments

@ror6ax
Copy link

ror6ax commented Sep 19, 2017

root project import: /home/ror6ax/Development/vault_keystone_plugin not in GOPATH
>echo $GOPATH                                                      
/home/ror6ax/Development/vault_keystone_plugin

Not sure what to make of this...

@sdboyer
Copy link
Member

sdboyer commented Sep 19, 2017

hi, welcome! sorry, i know this error is confusing, i'm putting up a quick PR to clarify it. code, including your current project, has to be under GOPATH/src.

it also looks like you're trying to have your project be the GOPATH, which isn't currently supported - your project needs to be a subpath within GOPATH - see #148

@ror6ax
Copy link
Author

ror6ax commented Sep 19, 2017

ror6ax@ror6ax:/home/ror6ax/Development/vault_keystone_plugin  git:(refactoring*) $ ls -l $GOPATH/src/vault_keystone_plugin 
total 24
drwxrwxr-x. 3 ror6ax ror6ax 4096 Sep 19 16:57 binary
-rw-rw-r--. 1 ror6ax ror6ax  623 Sep 19 16:57 main.go
-rw-rw-r--. 1 ror6ax ror6ax  368 Sep 19 16:57 Makefile
drwxrwxr-x. 3 ror6ax ror6ax 4096 Sep 19 16:57 pkg
drwxr-xr-x. 2 ror6ax ror6ax 4096 Sep 19 16:57 plugin
-rw-rw-r--. 1 ror6ax ror6ax 3760 Sep 19 16:57 README.md
ror6ax@ror6ax:/home/ror6ax/Development/vault_keystone_plugin  git:(refactoring*) $ echo $GOPATH                                       
/home/ror6ax/gopath
ror6ax@ror6ax:/home/ror6ax/Development/vault_keystone_plugin  git:(refactoring*) $ dep init                                           
ctx.DetectProjectGOPATH: /home/ror6ax/Development/vault_keystone_plugin is not within a known GOPATH

@sdboyer
Copy link
Member

sdboyer commented Sep 19, 2017

ah, so i guess you're trying to operate under a symlink (that's the only way i can imagine that output making sense). i can't tell from the above whether the symlink points from the GOPATH to your cwd, or if your cwd is beneath a symlink pointing into the GOPATH.

either way, move your cwd into the dir within GOPATH itself - cd $GOPATH/src/vault_keystone_plugin - and it should work fine. (yes, this can be annoying, and the FAQ suggests otherwise, depending on the direction of that symlink, but... #1146 )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants