tpl/internal: Synch Go templates fork with Go 1.16dev

This commit is contained in:
Bjørn Erik Pedersen
2020-12-03 13:50:17 +01:00
parent 66beac99c6
commit cf3e077da3
25 changed files with 2520 additions and 137 deletions

View File

@@ -404,11 +404,11 @@ func TestTypedContent(t *testing.T) {
}
// Test that we print using the String method. Was issue 3073.
type stringer struct {
type myStringer struct {
v int
}
func (s *stringer) String() string {
func (s *myStringer) String() string {
return fmt.Sprintf("string=%d", s.v)
}
@@ -421,7 +421,7 @@ func (s *errorer) Error() string {
}
func TestStringer(t *testing.T) {
s := &stringer{3}
s := &myStringer{3}
b := new(bytes.Buffer)
tmpl := Must(New("x").Parse("{{.}}"))
if err := tmpl.Execute(b, s); err != nil {