Separate type define (#983)

This commit is contained in:
田欧 2017-07-06 20:59:27 +08:00 committed by Bo-Yi Wu
parent 7387ef60be
commit 34e972e155
2 changed files with 28 additions and 32 deletions

View File

@ -9,34 +9,32 @@ import (
"net/http"
)
type (
Delims struct {
type Delims struct {
Left string
Right string
}
HTMLRender interface {
type HTMLRender interface {
Instance(string, interface{}) Render
}
HTMLProduction struct {
type HTMLProduction struct {
Template *template.Template
Delims Delims
}
HTMLDebug struct {
type HTMLDebug struct {
Files []string
Glob string
Delims Delims
FuncMap template.FuncMap
}
HTML struct {
type HTML struct {
Template *template.Template
Name string
Data interface{}
}
)
var htmlContentType = []string{"text/html; charset=utf-8"}

View File

@ -9,15 +9,13 @@ import (
"net/http"
)
type (
JSON struct {
type JSON struct {
Data interface{}
}
IndentedJSON struct {
type IndentedJSON struct {
Data interface{}
}
)
var jsonContentType = []string{"application/json; charset=utf-8"}