An error occurred fetching the project authors.
  1. 21 Aug, 2013 1 commit
    • Rob Pike's avatar
      text/template: implement comparison of basic types · 7bbe3206
      Rob Pike authored
      Add eq, lt, etc. to allow one to do simple comparisons.
      It's basic types only (booleans, integers, unsigned integers,
      floats, complex, string) because that's easy, easy to define,
      and covers the great majority of useful cases, while leaving
      open the possibility of a more sweeping definition later.
      
      {{if eq .X .Y}}X and Y are equal{{else}}X and Y are unequal{{end}}
      
      R=golang-dev, adg
      CC=golang-dev
      https://golang.org/cl/13091045
      7bbe3206
  2. 13 Aug, 2013 1 commit
    • Elias Naur's avatar
      text/template: Make function call builtin handle nil errors correctly · 83348a13
      Elias Naur authored
      The call builtin unconditionally tries to convert a second return value from a function to the error type. This fails in case nil is returned, effectively making call useless for functions returning two values.
      
      This CL adds a nil check for the second return value, and adds a test.
      
      Note that for regular function and method calls the nil error case is handled correctly and is verified by a test.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/12804043
      83348a13
  3. 03 May, 2013 1 commit
  4. 03 Oct, 2012 1 commit
    • Rob Pike's avatar
      text/template: better error messages during execution, · 7f4b4c0c
      Rob Pike authored
      They now show the correct name, the byte offset on the line, and context for the failed evaluation.
      Before:
              template: three:7: error calling index: index out of range: 5
      After:
              template: top:7:20: executing "three" at <index "hi" $>: error calling index: index out of range: 5
      Here top is the template that was parsed to create the set, and the error appears with the action
      starting at byte 20 of line 7 of "top", inside the template called "three", evaluating the expression
      <index "hi" $>.
      
      Also fix a bug in index: it didn't work on strings. Ouch.
      
      Also fix bug in error for index: was showing type of index not slice.
      The real previous error was:
              template: three:7: error calling index: can't index item of type int
      The html/template package's errors can be improved by building on this;
      I'll do that in a separate pass.
      
      Extends the API for text/template/parse but only by addition of a field and method. The
      old API still works.
      
      Fixes #3188.
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/6576058
      7f4b4c0c
  5. 09 Aug, 2012 1 commit
  6. 23 Jul, 2012 1 commit
  7. 08 Jul, 2012 1 commit
  8. 11 Apr, 2012 1 commit
  9. 03 Mar, 2012 1 commit
    • Rob Pike's avatar
      text/template: clean up function values · f1d3ff16
      Rob Pike authored
      The recent addition of automatic function invocation generated
      some troublesome ambiguities. Restore the previous behavior
      and compensate by providing a "call" builtin to make it easy to
      do what the automatic invocation did, but in a clear and explicit
      manner.
      
      Fixes #3140.
      
      At least for now.
      
      R=golang-dev, dsymonds, r
      CC=golang-dev
      https://golang.org/cl/5720065
      f1d3ff16
  10. 24 Nov, 2011 1 commit
    • Rob Pike's avatar
      text/template: new, simpler API · f56db6f5
      Rob Pike authored
      The Set type is gone. Instead, templates are automatically associated by
      being parsed together; nested definitions implicitly create associations.
      Only associated templates can invoke one another.
      
      This approach dramatically reduces the breadth of the construction API.
      
      For now, html/template is deleted from src/pkg/Makefile, so this can
      be checked in. Nothing in the tree depends on it. It will be updated next.
      
      R=dsymonds, adg, rsc, r, gri, mikesamuel, nigeltao
      CC=golang-dev
      https://golang.org/cl/5415060
      f56db6f5
  11. 08 Nov, 2011 1 commit
  12. 04 Nov, 2011 1 commit
  13. 03 Nov, 2011 1 commit
    • Rob Pike's avatar
      os,text,unicode: renamings · 37d82c85
      Rob Pike authored
      This is Go 1 package renaming CL #4.
      This one merely moves the source; the import strings will be
      changed after the next weekly release.
      This one moves pieces into os, text, and unicode.
      
      exec -> os/exec
      scanner -> text/scanner
      tabwriter -> text/tabwriter
      template -> text/template
      template/parse -> text/template/parse
      utf16 -> unicode/utf16
      utf8 -> unicode/utf8
      
      This should be the last of the source-rearranging CLs.
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/5331066
      37d82c85
  14. 02 Nov, 2011 2 commits
  15. 26 Oct, 2011 1 commit
  16. 17 Aug, 2011 2 commits
    • Rob Pike's avatar
      template: move exp/template into template. · a22e77e6
      Rob Pike authored
      (Leave exp/template/html where it is for now.)
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/4899048
      a22e77e6
    • Rob Pike's avatar
      url: new package · 1d8f822c
      Rob Pike authored
      This is just moving the URL code from package http into its own package,
      which has been planned for a while.
      Besides clarity, this also breaks a nascent dependency cycle the new template
      package was about to introduce.
      
      Add a gofix module, url, and use it to generate changes outside http and url.
      
      Sadness about the churn, gladness about some of the naming improvements.
      
      R=dsymonds, bradfitz, rsc, gustavo, r
      CC=golang-dev
      https://golang.org/cl/4893043
      1d8f822c
  17. 13 Aug, 2011 1 commit
  18. 12 Aug, 2011 1 commit
  19. 09 Aug, 2011 2 commits
  20. 08 Aug, 2011 1 commit
  21. 01 Aug, 2011 1 commit
  22. 14 Jul, 2011 2 commits
  23. 13 Jul, 2011 2 commits
  24. 10 Jul, 2011 1 commit
  25. 07 Jul, 2011 1 commit
  26. 06 Jul, 2011 3 commits
  27. 05 Jul, 2011 3 commits