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

Method Abort404

controllers/DocumentController.go:62–73  ·  view source on GitHub ↗
(bookName, bookLink string)

Source from the content-addressed store, hash-verified

60}
61
62func (this *DocumentController) Abort404(bookName, bookLink string) {
63 this.Ctx.ResponseWriter.WriteHeader(404)
64 this.Data["BookName"] = bookName
65 this.Data["BookLink"] = bookLink
66 this.TplName = "errors/404.html"
67 b, err := this.RenderBytes()
68 if err != nil {
69 this.Abort("404")
70 }
71 this.Ctx.ResponseWriter.Write(b)
72 this.StopRun()
73}
74
75// 解析并提取版本控制的commit内容
76func parseGitCommit(str string) (cont, commit string) {

Callers 1

ReadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected