(bookName, bookLink string)
| 60 | } |
| 61 | |
| 62 | func (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内容 |
| 76 | func parseGitCommit(str string) (cont, commit string) { |