MCPcopy Index your code
hub / github.com/TruthHun/BookStack / ExecuteViewPathTemplate

Method ExecuteViewPathTemplate

controllers/BaseController.go:252–266  ·  view source on GitHub ↗

ExecuteViewPathTemplate 执行指定的模板并返回执行结果.

(tplName string, data interface{})

Source from the content-addressed store, hash-verified

250
251// ExecuteViewPathTemplate 执行指定的模板并返回执行结果.
252func (this *BaseController) ExecuteViewPathTemplate(tplName string, data interface{}) (string, error) {
253 var buf bytes.Buffer
254
255 viewPath := this.ViewPath
256
257 if this.ViewPath == "" {
258 viewPath = beego.BConfig.WebConfig.ViewsPath
259
260 }
261
262 if err := beego.ExecuteViewPathTemplate(&buf, tplName, viewPath, data); err != nil {
263 return "", err
264 }
265 return buf.String(), nil
266}
267
268func (this *BaseController) BaseUrl() string {
269 host := beego.AppConfig.String("sitemap_host")

Callers 3

RecursiveFunFunction · 0.80
FindPasswordMethod · 0.80
ExecuteViewPathTemplateFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected