func RenderTString(templ TTemplate) string {
	tmpl, err := templ.Template()
	if err != nil {
		return ""
	}
	return RenderTTemplate(tmpl, templ)
}
RenderTString grabs a text template specified by templ interface
and renders it using that object.
package template
import (
	"bytes"
	"github.com/markbates/pkger"
	"gomd/util"
	htmpl "html/template"
	"io/ioutil"
	ttmpl "text/template"
)
type HTemplate interface {
	Template() (*htmpl.Template, error)
}
type TTemplate interface {
	Template() (*ttmpl.Template, error)
}
func HTemplateFromPath(path, name string) (*htmpl.Template, error) {
	f, err := pkger.Open(path)
	if err != nil {
		return nil, err
	}
	content, err := ioutil.ReadAll(f)
	if err != nil {
		return nil, err
	}
	tmpl, err := htmpl.New(name).Parse(string(content))
	if err != nil {
		return nil, err
	}
	return tmpl, nil
}
func RenderHTemplate(tmpl *htmpl.Template, obj interface{}) string {
	buf := []byte{}
	w := bytes.NewBuffer(buf)
	err := tmpl.Execute(w, obj)
	if err != nil {
		util.Logln(util.Error, err)
	}
	return w.String()
}
func RenderHString(templ HTemplate) string {
	tmpl, err := templ.Template()
	if err != nil {
		return ""
	}
	return RenderHTemplate(tmpl, templ)
}
func RenderHTML(templ HTemplate) htmpl.HTML {
	return htmpl.HTML(RenderHString(templ))
}
func TTemplateFromPath(path, name string) (*ttmpl.Template, error) {
	f, err := pkger.Open(path)
	if err != nil {
		return nil, err
	}
	content, err := ioutil.ReadAll(f)
	if err != nil {
		return nil, err
	}
	tmpl, err := ttmpl.New(name).Parse(string(content))
	if err != nil {
		return nil, err
	}
	return tmpl, nil
}
func RenderTTemplate(tmpl *ttmpl.Template, obj interface{}) string {
	buf := []byte{}
	w := bytes.NewBuffer(buf)
	err := tmpl.Execute(w, obj)
	if err != nil {
		util.Logln(util.Error, err)
	}
	return w.String()
}