Skip to content

text/template: use correct verbs for reflect.Value #69713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/text/template/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down