From 381a555f40bf6357bbea18093ad63dad2b7106fd Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 6 Jul 2011 15:56:39 +1000 Subject: [PATCH] exp/template: improve error message for non-exported field. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4636086 --- src/pkg/exp/template/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/exp/template/exec.go b/src/pkg/exp/template/exec.go index 1857e403ff7..87219e5e6c2 100644 --- a/src/pkg/exp/template/exec.go +++ b/src/pkg/exp/template/exec.go @@ -255,7 +255,7 @@ func (s *state) evalField(data reflect.Value, fieldName string) reflect.Value { if field.IsValid() && isExported(fieldName) { // valid and exported return field } - s.errorf("%s has no field %s", data.Type(), fieldName) + s.errorf("%s has no exported field %q", data.Type(), fieldName) default: s.errorf("can't evaluate field %s of type %s", fieldName, data.Type()) }