github.com/bketelsen/buffalo@v0.9.5/render/render.go (about) 1 package render 2 3 import ( 4 "github.com/gobuffalo/plush" 5 ) 6 7 // Engine used to power all defined renderers. 8 // This allows you to configure the system to your 9 // preferred settings, instead of just getting 10 // the defaults. 11 type Engine struct { 12 Options 13 } 14 15 // New render.Engine ready to go with your Options 16 // and some defaults we think you might like. 17 func New(opts Options) *Engine { 18 if opts.Helpers == nil { 19 opts.Helpers = map[string]interface{}{} 20 } 21 22 if opts.TemplateEngine == nil { 23 opts.TemplateEngine = plush.BuffaloRenderer 24 } 25 26 e := &Engine{ 27 Options: opts, 28 } 29 return e 30 }