Skip to content

Commit

Permalink
text/template: use correct verbs for reflect.Value
Browse files Browse the repository at this point in the history
Fixes #69708.

Change-Id: I8d7d10df4eed36cc76413d0645d89fe6e16f3296
  • Loading branch information
callthingsoff committed Sep 30, 2024
1 parent 7fd0b13 commit fcc1551
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit fcc1551

Please sign in to comment.