Descriptionexp/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
Patch Set 1 #Patch Set 2 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 5 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #Patch Set 6 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #Patch Set 7 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 25
Patch Set 8 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 18
Patch Set 9 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 2
Patch Set 10 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 11 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #Patch Set 12 : diff -r 48ec728c62b0 https://go.googlecode.com/hg/ #
Total comments: 2
MessagesTotal messages: 18
|