]> Cypherpunks repositories - gostls13.git/commit
text/template: template must be initialized at the time of creation
authorAamir Khan <syst3m.w0rm@gmail.com>
Tue, 19 May 2015 04:49:53 +0000 (13:49 +0900)
committerRob Pike <r@golang.org>
Mon, 1 Jun 2015 19:51:13 +0000 (19:51 +0000)
commit8801bdf2b3cb8f3d59664f56fba7eeb7a2cf0bdb
tree6ccd30c163979ba5438bbf58ab802a3172ffc8dd
parentbc8e129366ebc4244026884319c68c31c3127853
text/template: template must be initialized at the time of creation

t.init() should be called at the time of template creation
i.e, template.New() and t.New() instead of later in the process.

- Removed calls of t.init() from t.Parse(), t.Execute(), t.Funcs()
- Also got rid of t.common != nil checks as it should never be nil

Fixes #10879

Change-Id: I1b7ac812f02c841ae80037babce7e2b0a2df13e8
Reviewed-on: https://go-review.googlesource.com/10240
Reviewed-by: Rob Pike <r@golang.org>
src/text/template/exec.go
src/text/template/multi_test.go
src/text/template/template.go