Provided by: gccgo-go_1.12~1ubuntu1_amd64 bug


       go - tool for managing Go source code


       An  import  path (see go-importpath(1)) denotes a package stored in the local file system.
       Certain import paths also describe how to obtain the source code for the package  using  a
       revision control system.

       A few common code hosting sites have special syntax:

       BitBucket (Mercurial)
              import ""
              import ""

       GitHub (Git)
              import ""
              import ""

       Google Code Project Hosting (Git, Mercurial, Subversion)
              import ""
              import ""

              import ""
              import ""

       Launchpad (Bazaar)

              import ""
              import ""
              import ""

              import ""
              import ""

       For  code  hosted  on other servers, import paths may either be qualified with the version
       control type, or the go tool can dynamically fetch the import  path  over  https/http  and
       discover where the code resides from a <meta> tag in the HTML.

       To declare the code location, an import path of the form


       specifies  the  given repository, with or without the .vcs suffix, using the named version
       control system, and then the path inside that repository.  The supported  version  control
       systems are:





       For example,

           import ""

       denotes  the root directory of the Mercurial repository at or foo.hg,

           import ""

       denotes the foo/bar directory of the Git repository at or repo.git.

       When a version control system supports multiple protocols, each  is  tried  in  turn  when
       downloading.  For example, a Git download tries git://, then https://, then http://.

       If  the  import  path  is  not  a known code hosting site and also lacks a version control
       qualifier, the go tool attempts to fetch the import over https/http and looks for a <meta>
       tag in the document's HTML <head>.

       The meta tag has the form:

           <meta name="go-import" content="import-prefix vcs repo-root">

       The  import-prefix  is  the import path corresponding to the repository root. It must be a
       prefix or an exact match of the package being fetched with "go get". If it's not an  exact
       match, another http request is made at the prefix to verify the <meta> tags match.

       The vcs is one of "git", "hg", "svn", etc,

       The  repo-root  is  the  root  of  the  version control system containing a scheme and not
       containing a .vcs qualifier.

       For example,

           import ""

       will result in the following request(s):


       If that page contains the meta tag

           <meta name="go-import" content=" git">

       the go tool will verify that contains the same meta tag  and
       then git clone into GOPATH/src/

       New  downloaded  packages  are  written  to  the  first  directory  listed  in  the GOPATH
       environment variable (see go-path(1)).

       The go command attempts to download the version of the  package  appropriate  for  the  Go
       release being used.  See go-install(1) for more.


       This manual page was written by Michael Stapelberg <>, for the Debian
       project (and may be used by others).

                                            2012-05-13                               GO-REMOTE(7)