aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/exec
diff options
context:
space:
mode:
authorMike Samuel <mikesamuel@gmail.com>2011-08-12 14:34:29 +1000
committerRob Pike <r@golang.org>2011-08-12 14:34:29 +1000
commit595e9d50344eb9afe878490296b19c5eac1b38b0 (patch)
treec7b671ae415bcfc93d1f18a65a80af6286e1f7a3 /src/pkg/exec
parent1b13131c6bf7f3e26a38f5afbd1aa561cd77e317 (diff)
downloadgo-595e9d50344eb9afe878490296b19c5eac1b38b0.tar.xz
exp/template/html: New package with a toy template transformation.
func Reverse(*Template) *Template returns a template that produces the reverse of the original for any input. Changes outside exp/template/html include: - Adding a getter for a template's FuncMap so that derived templates can inherit function definitions. - Exported one node factory function, newIdentifier. Deriving tempaltes requires constructing new nodes, but I didn't export all of them because I think shallow copy functions might be more useful for this kind of work. - Bugfix: Template's Name() method ignores the name field so template.New("foo") is a nil dereference instead of "foo". Caveats: Reverse is a toy. It is not UTF-8 safe, and does not preserve order of calls to funcs in FuncMap. For context, see http://groups.google.com/group/golang-nuts/browse_thread/thread/e8bc7c771aae3f20/b1ac41dc6f609b6e?lnk=gst R=rsc, r, nigeltao, r CC=golang-dev https://golang.org/cl/4808089
Diffstat (limited to 'src/pkg/exec')
0 files changed, 0 insertions, 0 deletions