]> Cypherpunks repositories - gostls13.git/commit
template: implement multi-word variable instantation for formatters.
authorRob Pike <r@golang.org>
Thu, 2 Dec 2010 01:10:40 +0000 (17:10 -0800)
committerRob Pike <r@golang.org>
Thu, 2 Dec 2010 01:10:40 +0000 (17:10 -0800)
commit5e4882a3257b4885d6a91dad348f00c843db6e66
tree6208e569bfdbf301ccd62cc06a2af20a699a4ad3
parent4bafef81846dbfbcd5051ebd8515c32248166baf
template: implement multi-word variable instantation for formatters.
Before one could say
{field}
or
{field|formatter}
Now one can also say
{field1 field2 field3}
or
{field1 field2 field3|formatter}
and the fields are passed as successive arguments to the formatter,
analogous to fmt.Print.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/3385041
src/pkg/template/template.go
src/pkg/template/template_test.go