1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Refactor to server-rendered app.

This commit is contained in:
Ferdinand Mütsch
2020-02-20 14:28:55 +01:00
parent d583dd312b
commit b7f700e7a5
14 changed files with 405 additions and 329 deletions

14
utils/template.go Normal file
View File

@ -0,0 +1,14 @@
package utils
import (
"encoding/json"
"html/template"
)
func Json(data interface{}) template.JS {
d, err := json.Marshal(data)
if err != nil {
return ""
}
return template.JS(d)
}