Go Operations TO DELETE: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
:<tt>[[Go Commands - get#Remote_Imports|go get]]</tt> | :<tt>[[Go Commands - get#Remote_Imports|go get]]</tt> | ||
</blockquote> | </blockquote> | ||
=Sharing Code= | |||
From "Go in Action" - to clarify: <font color=purple>The package should live at the root of the repository. When you're using <tt>go get</tt>, 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 <tt>code</tt> or <tt>src</tt> 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.</font> Page 72. | |||
=Portability= | =Portability= |
Revision as of 20:36, 4 April 2016
Internal
Subjects
Remote Imports
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.