]> Cypherpunks repositories - gostls13.git/commit
exp/template: better template invocation
authorRob Pike <r@golang.org>
Sat, 9 Jul 2011 21:32:01 +0000 (07:32 +1000)
committerRob Pike <r@golang.org>
Sat, 9 Jul 2011 21:32:01 +0000 (07:32 +1000)
commit3987b91213e6e0d2e0b87fe8c79d2b0fe4923909
tree7968a408846275effe3f2d73467a2aceb92fd578
parentc17347eea971701057a30ef97ff2ef72f684760f
exp/template: better template invocation
1) Make the value optional ({{template "foo"}})
2) Allow the template identifier to be a thing of type *Template.
The second makes it easy to drop templates in to a set dynamically
during invocation.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4671056
src/pkg/exp/template/exec.go
src/pkg/exp/template/exec_test.go
src/pkg/exp/template/parse.go
src/pkg/exp/template/parse_test.go
src/pkg/exp/template/set_test.go