1. 24 Sep, 2012 5 commits
    • Russ Cox's avatar
      test: minor fixes in run and testlib · 3cd890dd
      Russ Cox authored
      Can tell this doesn't get run very often, but it is still important
      for when you've broken everything else.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/6547065
      3cd890dd
    • Russ Cox's avatar
      syscall: prepare for 64-bit ints · 3d5ddffa
      Russ Cox authored
      This CL fixes code that incorrectly assumes that int is 32 bits wide.
      Specifically, the socketpair system call expects a pointer to a pair
      of int32s, not a pair of ints. Fix this inside the wrappers without
      changing the APIs.
      
      Update #2188.
      
      R=golang-dev, r
      CC=golang-dev
      https://golang.org/cl/6552063
      3d5ddffa
    • Rob Pike's avatar
      text/template: allow .Field access to parenthesized expressions · 9050550c
      Rob Pike authored
      Change the grammar so that field access is a proper operator.
      This introduces a new node, ChainNode, into the public (but
      actually internal) API of text/template/parse. For
      compatibility, we only use the new node type for the specific
      construct, which was not parseable before. Therefore this
      should be backward-compatible.
      
      Before, .X.Y was a token in the lexer; this CL breaks it out
      into .Y applied to .X. But for compatibility we mush them
      back together before delivering. One day we might remove
      that hack; it's the simple TODO in parse.go/operand.
      
      This change also provides grammatical distinction between
              f
      and
              (f)
      which might permit function values later, but not now.
      
      Fixes #3999.
      
      R=golang-dev, dsymonds, gri, rsc, mikesamuel
      CC=golang-dev
      https://golang.org/cl/6494119
      9050550c
    • Russ Cox's avatar
      time: prepare for 64-bit ints · edce6349
      Russ Cox authored
      The code was trying to interpret a uint32 n as a signed quantity
      and then store it in an int. For this, int(n) currently works, but when
      int becomes 64 bits one must write int(int32(n)) instead, to get
      the 32-bit sign extension.
      
      Update #2188.
      
      R=golang-dev, nigeltao
      CC=golang-dev
      https://golang.org/cl/6551068
      edce6349
    • Alex Brainman's avatar
      net/http: use r.Body.Close to close connection during TestServeFileFromCWD · 5d50dbc5
      Alex Brainman authored
      Fixes #3917.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6553061
      5d50dbc5
  2. 23 Sep, 2012 7 commits
  3. 22 Sep, 2012 6 commits
  4. 21 Sep, 2012 10 commits
  5. 20 Sep, 2012 9 commits
  6. 19 Sep, 2012 3 commits
    • David Symonds's avatar
      vet: fix rangeloop. · 5a93fea0
      David Symonds authored
      In a range loop, the presence of a value implies the presence of a key.
      However, the presence of a value as an *ast.Ident does not imply that
      the key is also an *ast.Ident, thus leading to a panic any time the
      two argument form is used where the key is not an identifier.
      
      R=golang-dev, adg, r
      CC=golang-dev
      https://golang.org/cl/6540045
      5a93fea0
    • David Symonds's avatar
      misc/vim: fix Drop for imports after the first group. · adcf0a2a
      David Symonds authored
      Previously, an import block such as
      	import (
              	"net"
      
                      "stack"
              )
      would not permit ":Drop stack" to work because we were aborting
      the scan early, which is only correct when Import is in operation.
      
      R=golang-dev, franciscossouza
      CC=golang-dev
      https://golang.org/cl/6532053
      adcf0a2a
    • Robert Griesemer's avatar
      gofmt: added testcase for files containing \r\n line endings · 83601807
      Robert Griesemer authored
      (see also issue 3961).
      
      hexdump -c testdata/crlf.input
      0000000   /   *  \r  \n  \t   S   o   u   r   c   e       c   o   n   t
      0000010   a   i   n   i   n   g       C   R   /   L   F       l   i   n
      0000020   e       e   n   d   i   n   g   s   .  \r  \n  \t   T   h   e
      0000030       g   o   f   m   t   '   e   d       o   u   t   p   u   t
      0000040       m   u   s   t       o   n   l   y       h   a   v   e
      0000050   L   F  \r  \n  \t   l   i   n   e       e   n   d   i   n   g
      0000060   s   .  \r  \n   *   /  \r  \n   p   a   c   k   a   g   e
      0000070   m   a   i   n  \r  \n  \r  \n   f   u   n   c       m   a   i
      0000080   n   (   )       {  \r  \n  \t   /   /       l   i   n   e
      0000090   c   o   m   m   e   n   t  \r  \n  \t   p   r   i   n   t   l
      00000a0   n   (   "   h   e   l   l   o   ,       w   o   r   l   d   !
      00000b0   "   )       /   /       a   n   o   t   h   e   r       l   i
      00000c0   n   e       c   o   m   m   e   n   t  \r  \n  \t   p   r   i
      00000d0   n   t   l   n   (   )  \r  \n   }  \r  \n
      00000db
      
      hexdump -c testdata/crlf.golden
      0000000   /   *  \n  \t   S   o   u   r   c   e       c   o   n   t   a
      0000010   i   n   i   n   g       C   R   /   L   F       l   i   n   e
      0000020       e   n   d   i   n   g   s   .  \n  \t   T   h   e       g
      0000030   o   f   m   t   '   e   d       o   u   t   p   u   t       m
      0000040   u   s   t       o   n   l   y       h   a   v   e       L   F
      0000050  \n  \t   l   i   n   e       e   n   d   i   n   g   s   .  \n
      0000060   *   /  \n   p   a   c   k   a   g   e       m   a   i   n  \n
      0000070  \n   f   u   n   c       m   a   i   n   (   )       {  \n  \t
      0000080   /   /       l   i   n   e       c   o   m   m   e   n   t  \n
      0000090  \t   p   r   i   n   t   l   n   (   "   h   e   l   l   o   ,
      00000a0       w   o   r   l   d   !   "   )       /   /       a   n   o
      00000b0   t   h   e   r       l   i   n   e       c   o   m   m   e   n
      00000c0   t  \n  \t   p   r   i   n   t   l   n   (   )  \n   }  \n
      00000cf
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/6526052
      83601807