~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/cmd/pack/doc.go

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-11-18 15:12:26 UTC
  • mfrom: (14.2.12 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141118151226-zug7vn93mn3dtiz3
Tags: 2:1.3.2-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - Support co-installability with gccgo-go tool:
    - d/rules,golang-go.install: Rename bin/go -> bin/golang-go
    - d/golang-go.{postinst,prerm}: Install/remove /usr/bin/go using
      alternatives.
  - d/copyright: Amendments for full compiliance with copyright format.
  - d/control: Demote golang-go.tools to Suggests to support Ubuntu MIR.
  - dropped patches (now upstream):
    - d/p/issue27650045_40001_50001.diff
    - d/p/issue28050043_60001_70001.diff
    - d/p/issue54790044_100001_110001.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2009 The Go Authors. All rights reserved.
 
1
// Copyright 2014 The Go Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
 
5
 
// +build ignore
6
 
 
7
5
/*
8
6
 
9
 
Pack is a variant of the Plan 9 ar tool.  The original is documented at
10
 
 
11
 
        http://plan9.bell-labs.com/magic/man2html/1/ar
12
 
 
13
 
It adds a special Go-specific section __.PKGDEF that collects all the
14
 
Go type information from the files in the archive; that section is
15
 
used by the compiler when importing the package during compilation.
 
7
Pack is a simple version of the traditional Unix ar tool.
 
8
It implements only the operations needed by Go.
16
9
 
17
10
Usage:
18
 
        go tool pack [uvnbailogS][mrxtdpq][P prefix] archive files ...
19
 
 
20
 
The new option 'g' causes pack to maintain the __.PKGDEF section
21
 
as files are added to the archive.
22
 
 
23
 
The new option 'S' forces pack to mark the archive as safe.
24
 
 
25
 
The new option 'P' causes pack to remove the given prefix
26
 
from file names in the line number information in object files
27
 
that are already stored in or added to the archive.
 
11
        go tool pack op file.a [name...]
 
12
 
 
13
Pack applies the operation to the archive, using the names as arguments to the operation.
 
14
 
 
15
The operation op is given by one of these letters:
 
16
 
 
17
        c       append files (from the file system) to a new archive
 
18
        p       print files from the archive
 
19
        r       append files (from the file system) to the archive
 
20
        t       list files from the archive
 
21
        x       extract files from the archive
 
22
 
 
23
For the p, t, and x commands, listing no names on the command line
 
24
causes the operation to apply to all files in the archive.
 
25
 
 
26
In contrast to Unix ar, the r operation always appends to the archive,
 
27
even if a file with the given name already exists in the archive. In this way
 
28
pack's r operation is more like Unix ar's rq operation.
 
29
 
 
30
Adding the letter v to an operation, as in pv or rv, enables verbose operation:
 
31
For the c and r commands, names are printed as files are added.
 
32
For the p command, each file is prefixed by the name on a line by itself.
 
33
For the t command, the listing includes additional file metadata.
 
34
For the x command, names are printed as files are extracted.
 
35
 
28
36
*/
29
37
package main