diff options
| author | David Symonds <dsymonds@golang.org> | 2015-10-01 14:21:37 +1000 |
|---|---|---|
| committer | David Symonds <dsymonds@golang.org> | 2015-10-01 04:36:35 +0000 |
| commit | 090843b65074a306e4e807bdca1fbb7262ffce26 (patch) | |
| tree | 92087451a5f38718bbbbacc6b86822a6afa609a1 /src/html/template | |
| parent | 79480ca07a1515223d49031c59ae37b662f45b5e (diff) | |
| download | go-090843b65074a306e4e807bdca1fbb7262ffce26.tar.xz | |
text/template: change IsTrue to take interface{} instead of reflect.Value.
This is a follow-up to a326c3e to avoid reflect being in the API.
Fixes #12801.
Change-Id: Ic4c2e592e2c35b5911f75d88f1d9c44787c80f30
Reviewed-on: https://go-review.googlesource.com/15240
Run-TryBot: David Symonds <dsymonds@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
Diffstat (limited to 'src/html/template')
| -rw-r--r-- | src/html/template/template.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/html/template/template.go b/src/html/template/template.go index 4c38f36e67..5cfac49d08 100644 --- a/src/html/template/template.go +++ b/src/html/template/template.go @@ -9,7 +9,6 @@ import ( "io" "io/ioutil" "path/filepath" - "reflect" "sync" "text/template" "text/template/parse" @@ -420,6 +419,6 @@ func parseGlob(t *Template, pattern string) (*Template, error) { // IsTrue reports whether the value is 'true', in the sense of not the zero of its type, // and whether the value has a meaningful truth value. This is the definition of // truth used by if and other such actions. -func IsTrue(val reflect.Value) (truth, ok bool) { +func IsTrue(val interface{}) (truth, ok bool) { return template.IsTrue(val) } |
