summaryrefslogtreecommitdiff
path: root/src/cmd/pack/doc.go
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
committerMichael Stapelberg <stapelberg@debian.org>2014-06-19 09:22:53 +0200
commit8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch)
tree4449f2036cccf162e8417cc5841a35815b3e7ac5 /src/cmd/pack/doc.go
parentc8bf49ef8a92e2337b69c14b9b88396efe498600 (diff)
downloadgolang-upstream/1.3.tar.gz
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'src/cmd/pack/doc.go')
-rw-r--r--src/cmd/pack/doc.go40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/cmd/pack/doc.go b/src/cmd/pack/doc.go
index 67b789731..1529e07e9 100644
--- a/src/cmd/pack/doc.go
+++ b/src/cmd/pack/doc.go
@@ -1,29 +1,37 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ignore
-
/*
-Pack is a variant of the Plan 9 ar tool. The original is documented at
+Pack is a simple version of the traditional Unix ar tool.
+It implements only the operations needed by Go.
- http://plan9.bell-labs.com/magic/man2html/1/ar
+Usage:
+ go tool pack op file.a [name...]
-It adds a special Go-specific section __.PKGDEF that collects all the
-Go type information from the files in the archive; that section is
-used by the compiler when importing the package during compilation.
+Pack applies the operation to the archive, using the names as arguments to the operation.
-Usage:
- go tool pack [uvnbailogS][mrxtdpq][P prefix] archive files ...
+The operation op is given by one of these letters:
+
+ c append files (from the file system) to a new archive
+ p print files from the archive
+ r append files (from the file system) to the archive
+ t list files from the archive
+ x extract files from the archive
+
+For the p, t, and x commands, listing no names on the command line
+causes the operation to apply to all files in the archive.
-The new option 'g' causes pack to maintain the __.PKGDEF section
-as files are added to the archive.
+In contrast to Unix ar, the r operation always appends to the archive,
+even if a file with the given name already exists in the archive. In this way
+pack's r operation is more like Unix ar's rq operation.
-The new option 'S' forces pack to mark the archive as safe.
+Adding the letter v to an operation, as in pv or rv, enables verbose operation:
+For the c and r commands, names are printed as files are added.
+For the p command, each file is prefixed by the name on a line by itself.
+For the t command, the listing includes additional file metadata.
+For the x command, names are printed as files are extracted.
-The new option 'P' causes pack to remove the given prefix
-from file names in the line number information in object files
-that are already stored in or added to the archive.
*/
package main