我在/home/user/Documents/code/workspace/(Debian Jessie) 的子文件夹中有代码,例如 java/for java 和 python/for python 我编写的。对于 Eclipse 中的 golang,我应该使用工作区 ~/Documents/code/workspace 还是 ../workspace/go 或 ../workspace/go/src?
最佳答案
使用 workspace/go 作为你的工作区。来自 code organization guidelines在 golang.org 上
Go code must be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:
- src contains Go source files organized into packages (one package per directory),
- pkg contains package objects, and
- bin contains executable commands.
The go tool builds source packages and installs the resulting binaries to the pkg and bin directories.
The src subdirectory typically contains multiple version control repositories (such as for Git or Mercurial) that track the development of one or more source packages.
关于eclipse - golang 与其他语言的 Goclipse 工作区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34347133/