Example #1
0
// Copyright 2014 Manu Martinez-Almeida.  All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

package render

import (
	"net/http"

	"github.com/henrylee2cn/thinkgo/core/template"
)

// @modified by henry, 2016.1.12
var HTMLTemplate = template.New("thinkgo").Funcs(template.FuncMap{})

type (
	HTMLRender interface {
		Instance(string, interface{}) Render
	}

	HTMLProduction struct {
		Template *template.Template
	}

	HTMLDebug struct {
		Files []string
		Glob  string
	}

	HTML struct {
		Template *template.Template
Example #2
0
func NewRender() *Template {
	return &Template{
		Template: template.New("thinkgo").Funcs(template.FuncMap{}),
		pathmap:  make(map[string]string),
	}
}