1. 07 Jan, 2015 2 commits
    • Brad Fitzpatrick's avatar
      bufio: add Reader.Discard · ee2ecc45
      Brad Fitzpatrick authored
      Reader.Discard is the complement to Peek. It discards the next n bytes
      of input.
      
      We already have Reader.Buffered to see how many bytes of data are
      sitting available in memory, and Reader.Peek to get that that buffer
      directly. But once you're done with the Peek'd data, you can't get rid
      of it, other than Reading it.
      Both Read and io.CopyN(ioutil.Discard, bufReader, N) are relatively
      slow. People instead resort to multiple blind ReadByte calls, just to
      advance the internal b.r variable.
      
      I've wanted this previously, several people have asked for it in the
      past on golang-nuts/dev, and somebody just asked me for it again in a
      private email. There are a few places in the standard library we'd use
      it too.
      
      Change-Id: I85dfad47704a58bd42f6867adbc9e4e1792bc3b0
      Reviewed-on: https://go-review.googlesource.com/2260Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      ee2ecc45
    • Shenghou Ma's avatar
      runtime: fix build for race detector · 5f179c7c
      Shenghou Ma authored
      This CL only fixes the build, there are two failing tests:
      RaceMapBigValAccess1 and RaceMapBigValAccess2
      in runtime/race tests. I haven't investigated why yet.
      
      Updates #9516.
      
      Change-Id: If5bd2f0bee1ee45b1977990ab71e2917aada505f
      Reviewed-on: https://go-review.googlesource.com/2401Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5f179c7c
  2. 06 Jan, 2015 22 commits
  3. 05 Jan, 2015 11 commits
  4. 04 Jan, 2015 5 commits