Reputation: 271
I have code in /home/user/Documents/code/workspace/ (Debian Jessie) in subfolders like java/ for java and python/ for python I've written. For golang in Eclipse, should I use the workspace ~/Documents/code/workspace or ../workspace/go or ../workspace/go/src?
Upvotes: 1
Views: 237
Reputation: 4607
Use workspace/go as your workspace. From code organization guidelines on 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.
Upvotes: 1