~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to debian/man/go-path.7

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý, Ondřej Surý, Michael Stapelberg
  • Date: 2012-06-28 12:14:15 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120628121415-w1b0076ixkarr1ml
[ Ondřej Surý ]
* Imported Upstream version 1.0.2
* Update Vcs fields to reflect new git repository location
* Kill get-orig-source, since 1.0.0, the tarballs can be downloaded
  from webpage

[ Michael Stapelberg ]
* golang-mode: use debian-pkg-add-load-path-item (Closes: #664802)
* Add manpages (Closes: #632964)
* Use updated pt.po from Pedro Ribeiro (Closes: #674958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"                                      Hey, EMACS: -*- nroff -*-
 
2
.de Vb \" Begin verbatim text
 
3
.ft CW
 
4
.nf
 
5
.ne \\$1
 
6
..
 
7
.de Ve \" End verbatim text
 
8
.ft R
 
9
.fi
 
10
..
 
11
.TH GO-PATH 7 "2012-05-13"
 
12
.\" Please adjust this date whenever revising the manpage.
 
13
.SH NAME
 
14
go \- tool for managing Go source code
 
15
.SH DESCRIPTION
 
16
The Go path is used to resolve import statements.
 
17
It is implemented by and documented in the go/build package.
 
18
 
 
19
The GOPATH environment variable lists places to look for Go code.
 
20
On Unix, the value is a colon-separated string.
 
21
On Windows, the value is a semicolon-separated string.
 
22
On Plan 9, the value is a list.
 
23
 
 
24
GOPATH must be set to build and install packages outside the
 
25
standard Go tree.
 
26
 
 
27
Each directory listed in GOPATH must have a prescribed structure:
 
28
 
 
29
The src/ directory holds source code.  The path below 'src'
 
30
determines the import path or executable name.
 
31
 
 
32
The pkg/ directory holds installed package objects.
 
33
As in the Go tree, each target operating system and
 
34
architecture pair has its own subdirectory of pkg
 
35
(pkg/GOOS_GOARCH).
 
36
 
 
37
If DIR is a directory listed in the GOPATH, a package with
 
38
source in DIR/src/foo/bar can be imported as "foo/bar" and
 
39
has its compiled form installed to "DIR/pkg/GOOS_GOARCH/foo/bar.a".
 
40
 
 
41
The bin/ directory holds compiled commands.
 
42
Each command is named for its source directory, but only
 
43
the final element, not the entire path.  That is, the
 
44
command with source in DIR/src/foo/quux is installed into
 
45
DIR/bin/quux, not DIR/bin/foo/quux.  The foo/ is stripped
 
46
so that you can add DIR/bin to your PATH to get at the
 
47
installed commands.  If the GOBIN environment variable is
 
48
set, commands are installed to the directory it names instead
 
49
of DIR/bin.
 
50
 
 
51
Here's an example directory layout:
 
52
 
 
53
.Vb 4
 
54
\&    GOPATH=/home/user/gocode
 
55
\&
 
56
\&    /home/user/gocode/
 
57
\&        src/
 
58
\&            foo/
 
59
\&                bar/               (go code in package bar)
 
60
\&                    x.go
 
61
\&                quux/              (go code in package main)
 
62
\&                    y.go
 
63
\&        bin/
 
64
\&            quux                   (installed command)
 
65
\&        pkg/
 
66
\&            linux_amd64/
 
67
\&                foo/
 
68
\&                    bar.a          (installed package object)
 
69
.Ve
 
70
 
 
71
Go searches each directory listed in GOPATH to find source code,
 
72
but new packages are always downloaded into the first directory 
 
73
in the list.
 
74
.SH AUTHOR
 
75
.PP
 
76
This manual page was written by Michael Stapelberg <stapelberg@debian.org>,
 
77
for the Debian project (and may be used by others).