init template
This commit is contained in:
13
json/engine/engine.go
Normal file
13
json/engine/engine.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/encoding/json"
|
||||
"gitoa.ru/go-4devs/mime"
|
||||
"gitoa.ru/go-4devs/templating/engine"
|
||||
)
|
||||
|
||||
const Name = "json"
|
||||
|
||||
func New() engine.Encode {
|
||||
return engine.NewEncode(Name, json.Encode, mime.ExtJSON)
|
||||
}
|
||||
12
json/json.go
Normal file
12
json/json.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package json
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/templating"
|
||||
json "gitoa.ru/go-4devs/templating/json/engine"
|
||||
)
|
||||
|
||||
const Name = json.Name
|
||||
|
||||
func init() {
|
||||
templating.AddEngine(json.New())
|
||||
}
|
||||
Reference in New Issue
Block a user