26 Star 102 Fork 24

codeskyblue / gohttpserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
res.go 458 Bytes
一键复制 编辑 原始数据 按行查看 历史
codeskyblue 提交于 2016-07-28 15:24 . add ipa qrcode generate support
package main
import "html/template"
var (
tmpl *template.Template
templates = map[string]string{
"index": "res/index.tmpl.html",
"ipa-install": "res/ipa-install.tmpl.html",
}
)
func ParseTemplate(name string, content string) {
if tmpl == nil {
tmpl = template.New(name)
}
var t *template.Template
if tmpl.Name() == name {
t = tmpl
} else {
t = tmpl.New(name)
}
template.Must(t.New(name).Delims("[[", "]]").Parse(content))
}
Go
1
https://gitee.com/shxsun/gohttpserver.git
git@gitee.com:shxsun/gohttpserver.git
shxsun
gohttpserver
gohttpserver
master

搜索帮助