Go Operations TO DELETE

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Subjects


Sharing Code

From "Go in Action" - to clarify: The package should live at the root of the repository. When you're using go get, you specify the full path to the package that should be imported. This means that when you create a repository that you intend to share, the package name should be the repository name, and the package's source should be in the root of the repository's directory structure. A common mistake that new Go developers make is to create a code or src directory in their public repository. Doing so will make the package's public import longer. Instead, just put the package source files at the root of the public repository. Page 72.

Dependency Management

  • godep by Keith Rarick
  • vendor by Daniel Theophanes
  • gopkg.in Gustavo Niemeyer

Vendoring

Vendoring is a technique that involves copying the dependencies inside the project repository and then rewrite the import paths to reference those dependencies by providing the location inside the project itself.

One benefit of vendoring and import path rewriting is that the project repository is still go-gettable. When go get is called against the project repo, the tooling can find each package and store the package exactly where it needs to be inside the project itself.

gb

gb does not wrap Go tooling, nor GOPATH

gb replaces the workspace metaphor with a project-based approach.

No need for import path rewriting.

http://getgb.io

Go in Action page 75.

Debugging