code: func (r *RenderTemplateResult) ToBytes() (b *bytes.Buffer, err error) {
  	defer func() {
  		if rerr := recover(); rerr != nil {
  			resultsLog.Error("ApplyBytes: panic recovery", "recover-error", rerr)
  			err = fmt.Errorf("Template Execution Panic in %s:\n%s", r.Template.Name(), rerr)
  		}
  	}()
  	b = &bytes.Buffer{}
  	if err = r.renderOutput(b); err == nil {
  		if Config.BoolDefault("results.trim.html", false) {
  			b = r.compressHtml(b)
  		}
  	}
  	return
  }
docs: // Return a byte array and or an error object if the template failed to render