Separate type define (#983)
This commit is contained in:
parent
7387ef60be
commit
34e972e155
@ -9,34 +9,32 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type Delims struct {
|
||||||
Delims struct {
|
Left string
|
||||||
Left string
|
Right string
|
||||||
Right string
|
}
|
||||||
}
|
|
||||||
|
|
||||||
HTMLRender interface {
|
type HTMLRender interface {
|
||||||
Instance(string, interface{}) Render
|
Instance(string, interface{}) Render
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLProduction struct {
|
type HTMLProduction struct {
|
||||||
Template *template.Template
|
Template *template.Template
|
||||||
Delims Delims
|
Delims Delims
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLDebug struct {
|
type HTMLDebug struct {
|
||||||
Files []string
|
Files []string
|
||||||
Glob string
|
Glob string
|
||||||
Delims Delims
|
Delims Delims
|
||||||
FuncMap template.FuncMap
|
FuncMap template.FuncMap
|
||||||
}
|
}
|
||||||
|
|
||||||
HTML struct {
|
type HTML struct {
|
||||||
Template *template.Template
|
Template *template.Template
|
||||||
Name string
|
Name string
|
||||||
Data interface{}
|
Data interface{}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
var htmlContentType = []string{"text/html; charset=utf-8"}
|
var htmlContentType = []string{"text/html; charset=utf-8"}
|
||||||
|
|
||||||
|
@ -9,15 +9,13 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type JSON struct {
|
||||||
JSON struct {
|
Data interface{}
|
||||||
Data interface{}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
IndentedJSON struct {
|
type IndentedJSON struct {
|
||||||
Data interface{}
|
Data interface{}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
var jsonContentType = []string{"application/json; charset=utf-8"}
|
var jsonContentType = []string{"application/json; charset=utf-8"}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user