Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(457)

Unified Diff: src/pkg/exp/template/set.go

Issue 4826052: code review 4826052: exp/template: simplify the helper functions (Closed)
Patch Set: diff -r a5dffbdae6cf https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/exp/template/parse_test.go ('k') | src/pkg/exp/template/set_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/exp/template/set.go
===================================================================
--- a/src/pkg/exp/template/set.go
+++ b/src/pkg/exp/template/set.go
@@ -99,7 +99,8 @@
// multiple times for a given set, adding the templates defined in the string
// to the set. If a template is redefined, the element in the set is
// overwritten with the new definition.
-func (s *Set) Parse(text string) (err os.Error) {
+func (s *Set) Parse(text string) (set *Set, err os.Error) {
+ set = s
s.init()
defer s.recover(&err)
lex := lex("set", text)
@@ -130,5 +131,5 @@
t.addToSet(s)
s.tmpl[t.name] = t
}
- return nil
+ return s, nil
}
« no previous file with comments | « src/pkg/exp/template/parse_test.go ('k') | src/pkg/exp/template/set_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b