gin_html_render/gin_html_render.go
func (r *Render) Instance(name string, data interface{}) render.Render {
	var tpl *template.Template

	// Check if gin is running in debug mode and load the templates accordingly
	if r.Debug {
		tpl = r.loadTemplate(name)
	} else {
		tpl = r.Templates[name]
	}

	return render.HTML{
		Template: tpl,
		Data:     data,
	}
}
func (r *Render) Instance(name string, data interface{}) render.Render {
	var tpl *template.Template

	// Check if gin is running in debug mode and load the templates accordingly
	if r.Debug {
		tpl = r.loadTemplate(name)
	} else {
		tpl = r.Templates[name]
	}

	return render.HTML{
		Template: tpl,
		Data:     data,
	}
}
func ( r * Render ) Instance ( name string , data interface { } ) render . Render { var tpl * template . Template // Check if gin is running in debug mode and load the templates accordingly if r . Debug { tpl = r . loadTemplate ( name ) } else { tpl = r . Templates [ name ] } return render . HTML { Template : tpl , Data : data , } }
// Instance implements gin's HTML render interface
Instance implements gin s HTML render interface