package yatwiki import ( "database/sql" "fmt" "html/template" "net/http" "net/url" ) func (this *WikiServer) routeHistory(w http.ResponseWriter, r *http.Request, articleTitle string) { revs, err := this.db.GetRevisionHistory(articleTitle) if err != nil { if err == sql.ErrNoRows { this.serveErrorHTMLMessage(w, this.noSuchArticleError(articleTitle)) return } this.serveErrorMessage(w, err) return } if len(revs) == 0 { this.serveErrorHTMLMessage(w, this.noSuchArticleError(articleTitle)) return } pto := DefaultPageTemplateOptions(this.opts) pto.CurrentPageName = articleTitle pto.CurrentPageIsArticle = true content := `