diff --git a/doc/code.html b/doc/code.html index 4e8c54a1c52d9..b6d41ef68ca16 100644 --- a/doc/code.html +++ b/doc/code.html @@ -44,18 +44,16 @@
-A workspace is a directory hierarchy with three directories at its root: +A workspace is a directory hierarchy with two directories at its root:
src
contains Go source files,
-pkg
contains package objects, and
+src
contains Go source files, and
bin
contains executable commands.
-The go
tool builds source packages and installs the resulting
-binaries to the pkg
and bin
directories.
+The go
tool builds and installs binaries to the bin
directory.
@@ -72,10 +70,6 @@
-This won't produce an output file. To do that, you must use go
-install
, which places the package object inside the pkg
-directory of the workspace.
+This won't produce an output file.
+Instead it saves the compiled package in the local build cache.
@@ -400,19 +393,13 @@
-Whenever the go
tool installs a package or binary, it also
-installs whatever dependencies it has.
-So when you install the hello
program
+Install the hello
program:
$ go install github.com/user/hello-
-the stringutil
package will be installed as well, automatically.
-
Running the new version of the program, you should see a new, reversed message:
@@ -429,10 +416,6 @@bin/ hello # command executable -pkg/ - linux_amd64/ # this will reflect your OS and architecture - github.com/user/ - stringutil.a # package object src/ github.com/user/ hello/ @@ -441,22 +424,6 @@-Your first library
reverse.go # package source
-Note that go install
placed the stringutil.a
object
-in a directory inside pkg/linux_amd64
that mirrors its source
-directory.
-This is so that future invocations of the go
tool can find the
-package object and avoid recompiling the package unnecessarily.
-The linux_amd64
part is there to aid in cross-compilation,
-and will reflect the operating system and architecture of your system.
-
-Go command executables are statically linked; the package objects need not -be present to run Go programs. -
- -@@ -597,12 +564,6 @@
bin/ hello # command executable -pkg/ - linux_amd64/ - github.com/golang/example/ - stringutil.a # package object - github.com/user/ - stringutil.a # package object src/ github.com/golang/example/ .git/ # Git repository metadata