An error occurred fetching the project authors.
- 21 Aug, 2013 1 commit
-
-
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
-
- 13 Aug, 2013 1 commit
-
-
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
-
- 03 May, 2013 1 commit
-
-
Keith Randall authored
R=golang-dev, minux.ma, r CC=golang-dev https://golang.org/cl/9086043
-
- 03 Oct, 2012 1 commit
-
-
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
-
- 09 Aug, 2012 1 commit
-
-
Rob Pike authored
The keyword reprents an untyped nil and is useful for passing nil values to methods and functions. The nil will be promoted to the appropriate type when used; if a type cannot be assigned, an error results. R=rsc, dsymonds CC=golang-dev https://golang.org/cl/6459056
-
- 23 Jul, 2012 1 commit
-
-
Rob Pike authored
If the key is not present, return value of the type of the element not the type of the key. Also fix a test that should have caught this case. Fixes #3850. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6405078
-
- 08 Jul, 2012 1 commit
-
-
Matthew William Jibson authored
R=golang-dev, adg CC=golang-dev https://golang.org/cl/6355076
-
- 11 Apr, 2012 1 commit
-
-
Nigel Tao authored
below do not support '. This makes package html consistent with package text/template's HTMLEscape function. Fixes #3489. R=rsc, mikesamuel, dsymonds CC=golang-dev https://golang.org/cl/5992071
-
- 03 Mar, 2012 1 commit
-
-
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
-
- 24 Nov, 2011 1 commit
-
-
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
-
- 08 Nov, 2011 1 commit
-
-
Rob Pike authored
R=rsc CC=golang-dev https://golang.org/cl/5345045
-
- 04 Nov, 2011 1 commit
-
-
Russ Cox authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5340043
-
- 03 Nov, 2011 1 commit
-
-
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
-
- 02 Nov, 2011 2 commits
-
-
Russ Cox authored
R=adg CC=golang-dev https://golang.org/cl/5328062
-
Russ Cox authored
R=golang-dev, bsiegert, iant CC=golang-dev https://golang.org/cl/5294074
-
- 26 Oct, 2011 1 commit
-
-
Russ Cox authored
Nothing terribly interesting here. R=r, gri CC=golang-dev https://golang.org/cl/5308042
-
- 17 Aug, 2011 2 commits
-
-
Rob Pike authored
(Leave exp/template/html where it is for now.) R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4899048
-
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
-
- 13 Aug, 2011 1 commit
-
-
David Symonds authored
R=r, rsc CC=golang-dev https://golang.org/cl/4873046
-
- 12 Aug, 2011 1 commit
-
-
Rob Pike authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4868045
-
- 09 Aug, 2011 2 commits
-
-
Rob Pike authored
It means keeping two sets of maps, but things look cleaner from the outside. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4839056
-
Rob Pike authored
Mostly a mechanical change, with a few cleanups to make the split easier. The external interface to exp/template is unaffected. In another round I will play with the function map setup to see if I can avoid exposing reflect across the boundary, but that will require some structural changes I did not want to mix into this CL. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4849049
-
- 08 Aug, 2011 1 commit
-
-
David Symonds authored
R=r CC=golang-dev https://golang.org/cl/4837063
-
- 01 Aug, 2011 1 commit
-
-
Roger Peppe authored
R=r CC=golang-dev https://golang.org/cl/4808065
-
- 14 Jul, 2011 2 commits
-
-
Robert Griesemer authored
manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041
-
David Symonds authored
Angle brackets can trigger some browser sniffers, causing some output to be interpreted as HTML. Escaping angle brackets closes that security hole. R=r CC=golang-dev https://golang.org/cl/4714044
-
- 13 Jul, 2011 2 commits
-
-
Rob Pike authored
Russ suggested this technique, making the "and" and "or" functions handier. But it's hacky, and I can be talked out of it. R=dsymonds, rsc CC=golang-dev https://golang.org/cl/4698044
-
Rob Pike authored
- template invocation is by string constant only. - NewSet is gone. - no global Funcs - writer is now first arg to Execute R=rsc, r CC=golang-dev https://golang.org/cl/4700043
-
- 10 Jul, 2011 1 commit
-
-
Rob Pike authored
R=golang-dev, adg CC=golang-dev https://golang.org/cl/4687041
-
- 07 Jul, 2011 1 commit
-
-
Rob Pike authored
R=golang-dev, r, mattn.jp CC=golang-dev https://golang.org/cl/4664064
-
- 06 Jul, 2011 3 commits
-
-
Rob Pike authored
R=golang-dev, gri CC=golang-dev https://golang.org/cl/4636087
-
Rob Pike authored
R=golang-dev, adg, r CC=golang-dev https://golang.org/cl/4643072
-
David Symonds authored
R=r CC=golang-dev https://golang.org/cl/4671048
-
- 05 Jul, 2011 3 commits
-
-
Rob Pike authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4670045
-
Rob Pike authored
R=golang-dev, dsymonds, adg CC=golang-dev https://golang.org/cl/4626092
-
Rob Pike authored
Add the ability to attach functions to template and template sets. Make variadic functions and methods work. Still to come: static checking of function names during parse. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4643068
-