github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/render/render_test.go (about) 1 package render 2 3 import ( 4 "github.com/gobuffalo/packd" 5 ) 6 7 type Widget struct { 8 Name string 9 } 10 11 func (w Widget) ToPath() string { 12 return w.Name 13 } 14 15 func NewEngine() *Engine { 16 return New(Options{ 17 TemplatesBox: packd.NewMemoryBox(), 18 AssetsBox: packd.NewMemoryBox(), 19 }) 20 } 21 22 type rendFriend func(string, RendererFunc) Renderer