1. 28 Aug, 2017 27 commits
  2. 27 Aug, 2017 1 commit
  3. 26 Aug, 2017 2 commits
  4. 25 Aug, 2017 10 commits
    • Joe Tsai's avatar
      archive/tar: improve package documentation · bad6b6fa
      Joe Tsai authored
      Many aspects of the package is woefully undocumented.
      With the recent flurry of improvements, the package is now at feature
      parity with the GNU and TAR tools. Thoroughly all of the public API
      and perform some minor stylistic cleanup in some code segments.
      
      Change-Id: Ic892fd72c587f30dfe91d1b25b88c9c8048cc389
      Reviewed-on: https://go-review.googlesource.com/59210
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      bad6b6fa
    • Joe Tsai's avatar
      archive/tar: add raw support for global PAX records · 19a99594
      Joe Tsai authored
      The PAX specification says the following:
      <<<
      'g' represents global extended header records for the following files in the archive.
      The format of these extended header records shall be as described in pax Extended Header.
      Each value shall affect all subsequent files that do not override that value
      in their own extended header record and until another global extended header record
      is reached that provides another value for the same field.
      >>>
      
      This CL adds support for parsing and composing global PAX records,
      but intentionally does not provide support for automatically
      persisting the global state across files.
      
      Changes made:
      * When Reader encounters a TypeXGlobalRecord header, it parses the
      PAX records and returns them to the user ad-verbatim. Reader does not
      store them in its state, ensuring it has no effect on future Next calls.
      * When Writer receives a TypeXGlobalRecord header, it writes the
      PAX records to the archive ad-verbatim. It does not store them in
      its state, ensuring it has no effect on future WriteHeader calls.
      * The restriction regarding empty record values is lifted since this
      value is used to represent deletion in global headers.
      
      Why provide raw support only:
      * Some archives in the wild have a global header section (often empty)
      and it is the user's responsibility to manually read and discard it's body.
      The logic added here allows users to more easily skip over these sections.
      * For users that do care about global headers, having access to the raw
      records allows them to implement the functionality of global headers themselves
      and manually persist the global state across files.
      * We can still upgrade to a full implementation in the future.
      
      Why we don't provide full support:
      * Even though the PAX specification describes their operation in detail,
      both the GNU and BSD tar tools (which are the most common implementations)
      do not have a consistent interpretation of many details.
      * Global headers were a controversial feature in PAX, by admission of the
      specification itself:
        <<<
        The concept of a global extended header (typeflag g) was controversial.
      
        The typeflag g global headers should not be used with interchange media that
        could suffer partial data loss in transporting the archive.
        >>>
      * Having state persist from entry-to-entry complicates the implementation
      for a feature that is not widely used and not well supported.
      
      Change-Id: I1d904cacc2623ddcaa91525a5470b7dbe226c7e8
      Reviewed-on: https://go-review.googlesource.com/59190Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      19a99594
    • Hiroshi Ioka's avatar
      cmd/link: fix debug message · 37b04c90
      Hiroshi Ioka authored
      Change-Id: I6cb0ed9b726da34106ba239b57e2da732a8e1b71
      Reviewed-on: https://go-review.googlesource.com/50730Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      Reviewed-by: default avatarAvelino <t@avelino.xxx>
      37b04c90
    • Daniel Martí's avatar
      testing: error if -parallel is given N<1 · 86dde2de
      Daniel Martí authored
      Otherwise, if there are any parallel tests, it will hang and panic with
      "all goroutines are asleep - deadlock!".
      
      Do not use flag.Uint to handle the error for us because we also want to
      error on N==0, and because it would make setting the default to
      GOMAXPROCS(0) more difficult, since it's an int.
      
      Check for it right after flag.Parse, and mimic flag errors by printing
      the usage and returning exit code 2.
      
      Fixes #20542.
      
      Change-Id: I0c9d4587f83d406a8f5e42ed74e40be46d639ffb
      Reviewed-on: https://go-review.googlesource.com/54150
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      86dde2de
    • Meir Fischer's avatar
      testing: ensure profiles are written upon -timeout panic · 7e455b62
      Meir Fischer authored
      This addresses the case of a -timeout panic, but not the more
      general case of a signal arriving. See CL 48370 and CL 44352
      for recent difficulties in that area.
      
      "-timeout" here means flag usage to distinguish from the
      default timeout termination which uses signals.
      
      Fixes #19394
      
      Change-Id: I5452d5422c0c080e940cbcc8c6606049975268c6
      Reviewed-on: https://go-review.googlesource.com/48491Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7e455b62
    • Artyom Pervukhin's avatar
      crypto/tls: fix docstring of Config.ClientSessionCache · 85deaf60
      Artyom Pervukhin authored
      Closes #21519
      
      Change-Id: I1247e9435de93aae7e4db2b6e8e5be1b010c296b
      Reviewed-on: https://go-review.googlesource.com/56832Reviewed-by: default avatarAvelino <t@avelino.xxx>
      Reviewed-by: default avatarAdam Langley <agl@golang.org>
      85deaf60
    • Joe Tsai's avatar
      archive/tar: support arbitrary PAX records · a795ca51
      Joe Tsai authored
      This CL adds the following new publicly visible API:
      	type Header struct { ...; PAXRecords map[string]string }
      
      The new Header.PAXRecords field is a map of all PAX extended header records.
      
      We suggest (but do not enforce) that users use VENDOR-prefixed keys
      according to the following in the PAX specification:
      <<<
      The standard developers have reserved keyword name space for vendor extensions.
      It is suggested that the format to be used is:
      	VENDOR.keyword
      where VENDOR is the name of the vendor or organization in all uppercase letters.
      >>>
      
      When reading, the Header.PAXRecords is populated with all PAX records
      encountered so far, including basic ones (e.g., "path", "mtime", etc).
      When writing, the fields of Header will be merged into PAXRecords,
      overwriting any records that may conflict.
      
      Since PAXRecords is a more expressive feature than Xattrs and
      is entirely a superset of Xattrs, we mark Xattrs as deprecated,
      and steer users towards the new PAXRecords API.
      
      The issue has a discussion about adding a Header.SetPAXRecord method
      to help validate records and keep the Header fields in sync.
      However, we do not include that in this CL since that helper
      method can always be added in the future.
      
      There is no support for global records.
      
      Fixes #14472
      
      Change-Id: If285a52749acc733476cf75a2c7ad15bc1542071
      Reviewed-on: https://go-review.googlesource.com/58390
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      a795ca51
    • Joe Tsai's avatar
      go/build: add go1.10 build tag · 4d6da864
      Joe Tsai authored
      Add this early in the cycle so that we can start regression testing
      of the master toolchain.
      
      Change-Id: Ida3ccad6e9642648f489babd12877fc8a5eca07a
      Reviewed-on: https://go-review.googlesource.com/59151Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4d6da864
    • Ian Lance Taylor's avatar
      runtime: unify sigTabT type across Unix systems · 6126384f
      Ian Lance Taylor authored
      Change-Id: I8e8a3a118b1216f191c9076b70a88f6f3f19f79f
      Reviewed-on: https://go-review.googlesource.com/59150
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      6126384f
    • Borja Clemente's avatar
      bytes: Add missing examples to functions · 394f6a5a
      Borja Clemente authored
      Fixes #21570
      
      Change-Id: Ia0734929a04fbce8fdd5fbcb1b7baff9a8bbe39e
      Reviewed-on: https://go-review.googlesource.com/58030Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      Reviewed-by: default avatarJoe Tsai <thebrokentoaster@gmail.com>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      394f6a5a