Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix-import-path #18

Merged
merged 1 commit into from
Jul 7, 2017
Merged

Fix-import-path #18

merged 1 commit into from
Jul 7, 2017

Conversation

nobjohns
Copy link
Contributor

@nobjohns nobjohns commented Jul 6, 2017

The go get command import the project to GOROOT/github.com/beego/samples, not to GOROOT/samples

If we get the project with go get command and try to run, it will fail with errors something like below :

2017/07/06 17:54:25 ERROR ▶ 0003 Failed to build the application: main.go:5:2: cannot find package samples/todo/controllers in any of:
/usr/local/go/src/samples/todo/controllers (from GOROOT )
/home///src/samples/todo/controllers (from GOPATH)
GOROOT/samples is not the right location on idiomatic Go

The go get command import the project to GOPATH/github.com/beego/samples, not to GOPATH/samples

If we get the project with go get command and try to run, it will fail with errors something like below :

2017/07/06 17:54:25 ERROR    ▶ 0003 Failed to build the application: main.go:5:2: cannot find package samples/todo/controllers in any of:
/usr/local/go/src/samples/todo/controllers (from GOROOT)
/home/<username>/<project name>/src/samples/todo/controllers (from GOPATH)

GOPATH/samples is not the right location on idiomatic Go
@astaxie astaxie merged commit f6005b6 into beego:master Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants