]> Cypherpunks repositories - gostls13.git/commitdiff
template: do not use error as stringer
authorRuss Cox <rsc@golang.org>
Fri, 28 Oct 2011 04:17:47 +0000 (21:17 -0700)
committerRuss Cox <rsc@golang.org>
Fri, 28 Oct 2011 04:17:47 +0000 (21:17 -0700)
R=r
CC=golang-dev
https://golang.org/cl/5305069

src/pkg/template/exec_test.go

index 6c19f116b81f4b4dbee1205ca69c7551a141baf0..2d2b4029423d4a09762146bb08bb1f81ae28cc59 100644 (file)
@@ -98,7 +98,7 @@ var tVal = &T{
        Empty3:            []int{7, 8},
        Empty4:            &U{"UinEmpty"},
        NonEmptyInterface: new(T),
-       Str:               os.NewError("foozle"),
+       Str:               bytes.NewBuffer([]byte("foozle")),
        PI:                newInt(23),
        PSI:               newIntSlice(21, 22, 23),
        Tmpl:              Must(New("x").Parse("test template")), // "x" is the value of .X