summaryrefslogtreecommitdiff
path: root/src/pkg/template
AgeCommit message (Collapse)AuthorFilesLines
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý20-4583/+0
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý20-0/+4583
2011-09-13Imported Upstream version 60Ondřej Surý6-2077/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý2-2/+2
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý5-476/+657
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-5/+5
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-45/+45
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-1/+7
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý2-94/+221
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý2-12/+34
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý4-190/+307
2010-07-01strings and bytes.Split: make count of 0 mean 0, not infinite.Rob Pike1-1/+1
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev http://codereview.appspot.com/1704044 Committer: Rob Pike <r@golang.org>
2010-06-30template: fix typo in doc commentDaniel Fleischman1-1/+1
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/1665047 Committer: Russ Cox <rsc@golang.org>
2010-05-09template: regularize the handling of interfaces, pointers, andRob Pike1-79/+56
methods when looking up names. Fixes issue 764. R=rsc CC=golang-dev http://codereview.appspot.com/1170041
2010-04-28template: remove reference to json-templateAndrew Gerrand1-3/+1
Rather than confuse people by linking to a spec we don't fully support, let them just use the package docs. R=r, rsc CC=golang-dev http://codereview.appspot.com/1016041
2010-04-26template: fix handling of pointer inside interfaceRuss Cox2-1/+8
R=r CC=golang-dev http://codereview.appspot.com/982043
2010-04-21json: Marshal, Unmarshal using new scannerRuss Cox1-1/+1
R=r CC=golang-dev http://codereview.appspot.com/953041
2010-04-13template: use panic/recover to simplify internal error handling.Rob Pike1-50/+32
R=rsc CC=golang-dev http://codereview.appspot.com/824049
2010-03-30single argument panicRuss Cox1-2/+2
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev http://codereview.appspot.com/850041
2010-03-19template: fixed html formatter bug where it would turn a []byteAndrew Gerrand2-3/+18
into a string of decimal numbers. R=r, rsc CC=golang-dev http://codereview.appspot.com/624041
2010-03-10template: add ParseFile, MustParseFile, and associated testsAndrew Gerrand2-1/+37
R=r CC=golang-dev http://codereview.appspot.com/391041
2010-03-02gofmt: experiment: align values in map composites where possibleRobert Griesemer2-3/+3
- gofmt -w src misc - looking for feedback R=rsc, r CC=golang-dev http://codereview.appspot.com/223076
2010-02-26Fix a couple of bugs referencing data values in template.Micah Stetson2-0/+18
Adds tests and fixes for two cases that fail with the current release. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/217115 Committer: Rob Pike <r@golang.org>
2010-02-25strings: delete Runes, BytesRuss Cox3-11/+9
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench delete unused imports R=r CC=golang-dev http://codereview.appspot.com/224062
2010-02-24gofmt: don't print ()'s around function-typed results (not needed anymore)Robert Griesemer1-1/+1
- add extra test cases to go/printer tests - apply gofmt to src and misc R=rsc CC=golang-dev http://codereview.appspot.com/223041
2010-02-02Change type of Printf's args to ... interface{}Rob Pike1-2/+2
R=rsc CC=golang-dev http://codereview.appspot.com/197043
2010-01-15template: look inside interface valuesRuss Cox2-0/+23
R=r CC=golang-dev http://codereview.appspot.com/186169
2010-01-08Rewrite tokenizer to clean up and fix a bug with spaces before delimited block.Rob Pike2-45/+73
Fixes issue 501. R=rsc CC=golang-dev http://codereview.appspot.com/181183
2009-12-24implement .repeats for maps.Rob Pike2-27/+37
Fixes issue 309. R=rsc CC=golang-dev http://codereview.appspot.com/181044
2009-12-16add the ability to invoke niladic single-valued methods in templates.Rob Pike2-10/+86
Fixes issue 389. R=rsc CC=golang-dev http://codereview.appspot.com/180061
2009-12-151) Change default gofmt default settings forRobert Griesemer3-378/+378
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-72/+72
R=rsc http://codereview.appspot.com/172041
2009-11-30template: two bug fixes / nitsRuss Cox3-1/+17
* diagnose template not created with New (current code just crashes) * write []byte uninterpreted (current code writes fmt format: "[65 65 65 65]") R=r CC=golang-dev http://codereview.appspot.com/161075
2009-11-24Change to container/vector interface:Robert Griesemer2-2/+2
- removed New(len int) in favor of new(Vector).Resize(len, cap) - removed Init(len int) in favor of Resize(len, cap) - runs all.bash Fixes issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox2-3/+3
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-19Map support for template.Execute().James Meneghello2-12/+59
Allows the developer to pass a map either by itself for evaluation, or inside a struct. Access to data inside maps is identical to the current system for structs, ie. -Psuedocode- mp map[string]string = { "header" : "A fantastic header!", "footer" : "A not-so-fantastic footer!", } template.Execute(mp) ...can be accessed using {header} and {footer} in the template. Similarly, for maps inside structs: type s struct { mp map[string]string, } s1 = new s s1.mp["header"] = "A fantastic header!"; template.Execute(s1) ...is accessed using {mp.header}. Multi-maps, ie. map[string](map[string]string) and maps of structs containing more maps are unsupported, but then, I'm not even sure if that's supported by the language. Map elements can be of any type that can be written by the formatters. Keys should really only be strings. Fixes issue 259. R=r, rsc http://codereview.appspot.com/157088 Committer: Rob Pike <r@golang.org>
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer3-11/+11
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer3-101/+101
R=rsc, r http://go/go-review/1025029
2009-11-08a nagging inconsistency: capitalization ofRuss Cox2-6/+6
HTML vs Html, URL vs Url, HTTP vs Http, current source is 6:1 in favor of the former, so change instances of the latter. R=r CC=go-dev http://go/go-review/1024026
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer2-7/+5
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05- gofmt'ing of some stragglers, now with correct comment indentationRobert Griesemer1-97/+97
in special cases - re-gofmt'ing of some files that are now improved R=r, rsc http://go/go-review/1023003
2009-11-05gofmt-ify strings, templateRobert Griesemer1-72/+72
R=r http://go/go-review/1018064
2009-11-05gofmt-ify template, time, unsafe, flag, fmtRobert Griesemer1-5/+5
(replacement for CLs 1017039, 1017041, 1017040, 1018054) R=r http://go/go-review/1018060
2009-11-04panic can't print interfaces well so use err.String()Rob Pike1-1/+1
R=rsc http://go/go-review/1016041
2009-11-03add " and ' to list of html-escaped charsRobert Griesemer1-15/+24
R=rsc http://go/go-review/1017025
2009-11-02fix buildRob Pike1-1/+1
R=gri http://go/go-review/1017014
2009-11-02forgot to count newlines when scanning white space.Rob Pike1-1/+2
also fix a error-printing bug in godoc. R=gri http://go/go-review/1016030
2009-11-02remove goroutines from template parsing.Rob Pike1-31/+75
fix up one usage to take advantage. R=rsc CC=go-dev http://go/go-review/1018023
2009-10-27files that are okay from the last gofmt roundRuss Cox1-3/+1
R=gri http://go/go-review/1015011