View executes and writes the result of a template file to the writer. First parameter is the writer to write the parsed template. Second parameter is the relative, to templates directory, template filename, including extension. Third parameter is the layout, can be empty string. Forth parameter is
(writer io.Writer, filename string, layout string, bindingData interface{})
| 422 | // Use context.View to render templates to the client instead. |
| 423 | // Returns an error on failure, otherwise nil. |
| 424 | func (app *Application) View(writer io.Writer, filename string, layout string, bindingData interface{}) error { |
| 425 | if !app.view.Registered() { |
| 426 | err := errors.New("view engine is missing, use `RegisterView`") |
| 427 | app.logger.Error(err) |
| 428 | return err |
| 429 | } |
| 430 | |
| 431 | return app.view.ExecuteWriter(writer, filename, layout, bindingData) |
| 432 | } |
| 433 | |
| 434 | // GetContextPool returns the Iris sync.Pool which holds the contexts values. |
| 435 | // Iris automatically releases the request context, so you don't have to use it. |
nothing calls this directly
no test coverage detected