zxh0 / jvm.go

A toy JVM written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not change users' GOPATH

monnand opened this issue · comments

It is considered as a bad practice to ask users to change their GOPATH to build some library/program. Because users could not install the program through go get. More details could be found here. To quote:

Sometimes people set GOPATH to the root of their source repository and put their packages in directories relative to the repository root, such as "src/my/package". On one hand, this keeps the import paths short ("my/package" instead of "github.com/me/project/my/package"), but on the other it breaks go get and forces users to re-set their GOPATH to use the package. Don't do this.

To make it more idiomatic, I would suggest you to move every thing in src/ to the root directory and change the import paths accordingly.

commented

work in progress...

Seconded. It's the first thing I noticed from the readme and it makes it obvious you didn't read/understand How to Write Go Code; so why should anyone look any further at any Go code you write?

commented

Yes, I didn't understand How to Write Go Code clearly :(
I have fixed this issue.