From 41d189a3f68bbda96fcaf83b7db5d69d51c58bcf Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Mon, 30 Sep 2024 15:04:36 +0000 Subject: [PATCH] text/template: use correct verbs for reflect.Value Fixes #69708. Change-Id: I7a0347aff75cc8dad3f6c36966b1d03822a78dc9 GitHub-Last-Rev: fcc15513e48ceae68b846e1dff69b459defb2614 GitHub-Pull-Request: golang/go#69713 Reviewed-on: https://go-review.googlesource.com/c/go/+/616695 Auto-Submit: Ian Lance Taylor Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Reviewed-by: Rob Pike Reviewed-by: Ian Lance Taylor --- src/text/template/exec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text/template/exec.go b/src/text/template/exec.go index a70d383566d726..872d8aaa0cce6a 100644 --- a/src/text/template/exec.go +++ b/src/text/template/exec.go @@ -398,7 +398,7 @@ func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: if len(r.Pipe.Decl) > 1 { - s.errorf("can't use %s to iterate over more than one variable", val) + s.errorf("can't use %v to iterate over more than one variable", val) break } run := false @@ -453,7 +453,7 @@ func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) { case reflect.Func: if val.Type().CanSeq() { if len(r.Pipe.Decl) > 1 { - s.errorf("can't use %s iterate over more than one variable", val) + s.errorf("can't use %v iterate over more than one variable", val) break } run := false