diff options
Diffstat (limited to 'src/text/template/exec.go')
| -rw-r--r-- | src/text/template/exec.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/text/template/exec.go b/src/text/template/exec.go index 7d92bd9d36..0e517a6ec3 100644 --- a/src/text/template/exec.go +++ b/src/text/template/exec.go @@ -551,7 +551,7 @@ func (s *state) evalField(dot reflect.Value, fieldName string, node parse.Node, // Unless it's an interface, need to get to a value of type *T to guarantee // we see all methods of T and *T. ptr := receiver - if ptr.Kind() != reflect.Interface && ptr.CanAddr() { + if ptr.Kind() != reflect.Interface && ptr.Kind() != reflect.Ptr && ptr.CanAddr() { ptr = ptr.Addr() } if method := ptr.MethodByName(fieldName); method.IsValid() { |
