jkl/jkl_test.go
Olivier Tremblay 1458b63287
Canonical path is actually otremblay.com/jkl
Also we use go dep instead of godeps
2017-10-20 20:40:29 -04:00

20 lines
306 B
Go

package jkl
import (
"os"
"testing"
"text/template"
)
type TestType struct {
Field string
}
func (t *TestType) String() string {
return t.Field
}
func TestStringerInTemplate(t *testing.T) {
x := template.Must(template.New("stuff").Parse("{{.}}"))
x.Execute(os.Stdout, &TestType{"This works"})
}