all repos — searchix @ 0fcfb0252f229d00b426b171ddcd0fb1f1213063

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: inline variable

Alan Pearce
commit

0fcfb0252f229d00b426b171ddcd0fb1f1213063

parent

35c0945e328d09292281439a280b5fce5d172a31

1 file changed, 1 insertion(+), 3 deletions(-)

changed files
M internal/server/source.gointernal/server/source.go
@@ -27,8 +27,6 @@ h.global.Search(h.source, w, r)
} func (h *SourceHandler) Detail(w http.ResponseWriter, r *http.Request) { - importerSingular := h.source.Importer.Singular() - doc, err := h.global.index.GetDocument(r.Context(), h.source, r.PathValue("id")) if err != nil { if ftag.Get(err) == ftag.NotFound {
@@ -77,7 +75,7 @@ } else {
baseErr = components.DetailPage(tdata, doc).Render(w) } if baseErr != nil { - h.global.log.Error("template error", "template", importerSingular, "error", baseErr) + h.global.log.Error("template error", "template", h.source.Importer.Singular(), "error", baseErr) h.global.errorHandler(w, r, baseErr.Error(), http.StatusInternalServerError) } }