- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestStringer (4.04 sec)
-
src/html/template/content_test.go
return fmt.Sprintf("string=%d", s.v) } type errorer struct { v int } func (s *errorer) Error() string { return fmt.Sprintf("error=%d", s.v) } func TestStringer(t *testing.T) { s := &myStringer{3} b := new(strings.Builder) tmpl := Must(New("x").Parse("{{.}}")) if err := tmpl.Execute(b, s); err != nil { t.Fatal(err) } var expect = "string=3"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:48:16 UTC 2022 - 13.5K bytes - Viewed (0)