func RenderTemplate(t *template.Template, vars interface{}) []byte {
	out := bytes.NewBuffer(nil)
	err := t.Execute(out, vars)
	if err != nil {
		panic(err.Error())
	}
	return out.Bytes()
}
RenderView renders a template using the provided template and vars struct
and returns the rendered tamplate
package goanna
import (
	"bytes"
	"html/template"
	"net/http"
	"net/url"
)
type ControllerInterface interface {
	Init()
	Session() Session
	SetRequest(*http.Request)
}
type Controller struct {
	Request       *Request
	sessionFinder SessionFinder
}
func (c *Controller) SetRequest(req *http.Request) {
	c.Request = &Request{Request: req}
}
func (c *Controller) Session() Session {
	if c.Request.session == nil {
		c.Request.session = c.sessionFinder(c.Request)
	}
	return c.Request.session
}
func NewController(sessionFinder SessionFinder) Controller {
	return Controller{
		sessionFinder: sessionFinder,
	}
}
func (c *Controller) LogRequest(reason string) {
	LogRequest(c.Request, reason)
}
func (c *Controller) RenderView(templateStr string, vars interface{}) []byte {
	t, err := template.New("RenderView").Parse(templateStr)
	if err != nil {
		panic(err.Error())
	}
	return c.RenderTemplate(t, vars)
}