Lines Matching full:code
6 "<code><a href="/cmd/go/">go</a></code>", that
18 express dependencies between code libraries clearly, hence the package
20 start that you might want arbitrary syntax for describing the code
24 code using only the information found in the source itself, not
31 expedience, we postponed the automation of building Go code by using
50 about the <code>goinstall</code> command
51 (now replaced by <a href="/cmd/go/#hdr-Download_and_install_packages_and_dependencies"><code>go get</code></a>)
53 the URL of the source code; second, that the place to store the sources in
56 fourth, that the package is built using only information in the source code.
61 provide just a little extra configuration beyond what's in the source code.
74 <p>The <code>go</code> command requires that code adheres to a few key,
78 source code. For Bitbucket, GitHub, Google Code, and Launchpad, the
80 main URL, without the <code>http://</code> prefix. Subdirectories are named by
89 "<code>github.com/golang/example</code>".
92 "<code>github.com/golang/example/stringutil</code>".</p>
97 deduce where to obtain the source code.</p>
101 is <code>$GOPATH/src/<import-path></code>. If <code>$GOPATH</code> is
102 unset, the go command will fall back to storing source code alongside the
103 standard Go packages, in <code>$GOROOT/src/<import-path></code>.
104 If <code>$GOPATH</code> is set to a list of paths, the go command tries
105 <code><dir>/src/<import-path></code> for each of the directories in
109 "<code>bin</code>", for holding compiled executables, and a top-level directory
110 named "<code>pkg</code>", for holding compiled packages that can be imported,
111 and the "<code>src</code>" directory, for holding package source files.
141 the information in <a href="/doc/code.html">How to Write Go Code</a>,
143 to keep your source code separate from the Go distribution source
144 tree, the first step is to set <code>$GOPATH</code>, the one piece of global
145 configuration that the go command needs. The <code>$GOPATH</code> can be a
148 <code>$GOPATH</code> for each of your projects. One <code>$GOPATH</code> can
151 <p>Here?s an example. Let?s say we decide to keep our Go code in the directory
152 <code>$HOME/mygo</code>. We need to create that directory and set
153 <code>$GOPATH</code> accordingly.</p>
161 <p>Into this directory, we now add some source code. Suppose we want to use
163 red-black tree. We can install both with the "<code>go get</code>"
167 $ go get code.google.com/p/codesearch/index
173 <code>$GOPATH</code> directory. The one tree now contains the two directories
174 <code>src/code.google.com/p/codesearch/index/</code> and
175 <code>src/github.com/petar/GoLLRB/llrb/</code>, along with the compiled
176 packages (in <code>pkg/</code>) for those libraries and their dependencies.</p>
180 corresponding repositories, such as related packages. The "<code>go list</code>"
182 the pattern "<code>./...</code>" means start in the current directory
183 ("<code>./</code>") and find all packages below that directory
184 ("<code>...</code>"):</p>
188 code.google.com/p/codesearch/cmd/cgrep
189 code.google.com/p/codesearch/cmd/cindex
190 code.google.com/p/codesearch/cmd/csearch
191 code.google.com/p/codesearch/index
192 code.google.com/p/codesearch/regexp
193 code.google.com/p/codesearch/sparse
203 ? code.google.com/p/codesearch/cmd/cgrep [no test files]
204 ? code.google.com/p/codesearch/cmd/cindex [no test files]
205 ? code.google.com/p/codesearch/cmd/csearch [no test files]
206 ok code.google.com/p/codesearch/index 0.239s
207 ok code.google.com/p/codesearch/regexp 0.021s
208 ? code.google.com/p/codesearch/sparse [no test files]
218 $ cd $GOPATH/src/code.google.com/p/codesearch/regexp
220 code.google.com/p/codesearch/regexp
229 ok code.google.com/p/codesearch/regexp 0.021s
234 <p>That "<code>go install</code>" subcommand installs the latest copy of the
236 dependency graph, "<code>go install</code>" also installs any packages that
239 <p>Notice that "<code>go install</code>" was able to determine the name of the
242 the name of the directory where we kept source code, and we probably wouldn't
248 projects at once within a single <code>$GOPATH</code> root directory.</p>
256 <a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
257 <code>generate</code></a>,
259 the build, such as by running <code>yacc</code>.
265 "<code>go get</code>" without needing to obtain and build
270 <p>For more information, read <a href="/doc/code.html">How to Write Go Code</a>