<commit_before>package revel

import (
	"html/template"
	"io"
	"log"
	"strings"
)

const GO_TEMPLATE = "go"


// Adapter for Go Templates.
type GoTemplate struct {
	*template.Template
	engine *GoEngine
	*TemplateView
}

// return a 'revel.Template' from Go's template.
func (gotmpl GoTemplate) Render(wr io.Writer, arg interface{}) error {
	return gotmpl.Execute(wr, arg)
}

type GoEngine struct {
	loader      *TemplateLoader
	templateSet *template.Template
	// TemplatesBylowerName is a map from lower case template name to the real template.
	templatesBylowerName map[string]*GoTemplate
	splitDelims          []string
	CaseInsensitiveMode bool
}

func (i *GoEngine) ConvertPath(path string) string {
	if i.CaseInsensitiveMode {
		return strings.ToLower(path)
	}
	return path
}

func (i *GoEngine) Handles(templateView *TemplateView) bool{
	return EngineHandles(i, templateView)
}

func (engine *GoEngine) ParseAndAdd(baseTemplate *TemplateView) error {
	// If alternate delimiters set for the project, change them for this set
	if engine.splitDelims != nil && baseTemplate.Location() == ViewsPath {<commit_msg>Fixes template delimiters issue Closes #1199<commit_after>package revel

import (
	"html/template"
	"io"
	"log"
	"strings"
)

const GO_TEMPLATE = "go"


// Adapter for Go Templates.
type GoTemplate struct {
	*template.Template
	engine *GoEngine
	*TemplateView
}

// return a 'revel.Template' from Go's template.
func (gotmpl GoTemplate) Render(wr io.Writer, arg interface{}) error {
	return gotmpl.Execute(wr, arg)
}

type GoEngine struct {
	loader      *TemplateLoader
	templateSet *template.Template
	// TemplatesBylowerName is a map from lower case template name to the real template.
	templatesBylowerName map[string]*GoTemplate
	splitDelims          []string
	CaseInsensitiveMode bool
}

func (i *GoEngine) ConvertPath(path string) string {
	if i.CaseInsensitiveMode {
		return strings.ToLower(path)
	}
	return path
}

func (i *GoEngine) Handles(templateView *TemplateView) bool{
	return EngineHandles(i, templateView)
}

func (engine *GoEngine) ParseAndAdd(baseTemplate *TemplateView) error {
	// If alternate delimiters set for the project, change them for this set
	if engine.splitDelims != nil && strings.Index(baseTemplate.Location(), ViewsPath)>-1 {
{'fraction_non_alphanumeric': 0.09458864936207655, 'fraction_numerical': 0.002199736031676199, 'mean_word_length': 4.6992481203007515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4001576', 'n_tokens_mistral': 724, 'n_tokens_neox': 711, 'n_words': 221}