1. 15 Aug, 2011 7 commits
    • Gustavo Niemeyer's avatar
      build: support versioning without hg · 220c7498
      Gustavo Niemeyer authored
      CL 4873048 introduced the ability to build without hg and
      getting an "unknown" version.  While this approach works
      to avoid the hg dependency, it also means that every
      exported tree that is built without hg or .hg will have not
      only missing information, but will also be compatible to
      one another.  Considering that it is a common practice to
      remove the VCS data in distributions, I suggest we don't
      take this approach to avoid its consequences.
      
      This CL fixes the same problem in a different way: if a
      VERSION file at the top of the tree exists, use it at
      all times.  If it doesn't, fall back to using information
      from hg necessarily, and fail if that's not possible.  The
      error message when VERSION and hg are not available
      instructs users to handle it properly.
      
      The VERSION file can be generated with
      "src/version.bash -save" while hg is still around.
      
      R=golang-dev, rsc, gustavo
      CC=golang-dev
      https://golang.org/cl/4897043
      220c7498
    • Gustavo Niemeyer's avatar
      reflect: panic on Invalid Interface call · a2bb0159
      Gustavo Niemeyer authored
      This was initially pushed as part of CL 4876046, found
      when logic in exp/template was using the method on
      an Invalid value.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/4890043
      a2bb0159
    • Andrew Gerrand's avatar
      build: don't require hg for build · 241a262f
      Andrew Gerrand authored
      R=golang-dev, dsymonds, n13m3y3r
      CC=golang-dev
      https://golang.org/cl/4873048
      241a262f
    • Gustavo Niemeyer's avatar
      runtime: fix pseudo-randomness on some selects · 17584929
      Gustavo Niemeyer authored
      Fixes #2152.
      
      R=golang-dev, dvyukov
      CC=golang-dev
      https://golang.org/cl/4888044
      17584929
    • Rob Pike's avatar
      old/template: copy code from template · d7440ce2
      Rob Pike authored
      First step of moving exp/template into template: save the old code.
      Code is unedited except for target name in Makefile.
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/4893042
      d7440ce2
    • Gustavo Niemeyer's avatar
      exp/template: support field syntax on maps · e3df71f5
      Gustavo Niemeyer authored
      While using exp/template in practice, the syntax for
      indexing values using the "index" action was found to be
      very inconvenient for frequent use when handling dynamic
      data from maps such as the ones used with json and yaml,
      that use a type like map[string]interface{}.
      
      For these kinds of maps, the default handling of fields as
      {{.Field}} makes the task of handling the several references
      significantly more pleasant and elegant, and is equivalent
      to what's currently done in the "template" package and in
      other external packages (e.g. mustache).
      
      Even with this change, the index action is still relevant
      as it allows indexing maps in other scenarios where keys
      wouldn't be valid field names.
      
      R=golang-dev, r, gustavo
      CC=golang-dev
      https://golang.org/cl/4898043
      e3df71f5
    • Gustavo Niemeyer's avatar
      exp/template: don't panic on range of nil interface · e3f3a541
      Gustavo Niemeyer authored
      This avoids a non-obvious panic when range is used on a
      nil interface, and fixes it by behaving as if the range
      was empty.
      
      The new behavior is equivalent to the outcome of iterating
      on a nil map or slice, and is useful because it allows
      generic structures such as used in json (map[string]interface{})
      to behave correctly if a key generally set to a list or map
      isn't present.
      
      R=golang-dev, r, gustavo
      CC=golang-dev
      https://golang.org/cl/4876046
      e3f3a541
  2. 14 Aug, 2011 2 commits
  3. 13 Aug, 2011 3 commits
  4. 12 Aug, 2011 12 commits
  5. 11 Aug, 2011 7 commits
  6. 10 Aug, 2011 9 commits