From 5b57843346fddf11f4a328d34c9bc2509825416a Mon Sep 17 00:00:00 2001 From: Mathias Date: Sat, 4 Jul 2026 14:13:16 +0200 Subject: [PATCH] fix(lint): revert redundant Write conversion (staticcheck S1016) writeRequest and WriteNoteOptions have matching fields again now that both carry SourceType, so the explicit field-by-field literal added in ee1204d is flagged as a redundant conversion. Back to the plain type conversion. Caught by task check (golangci-lint), not run locally before the previous push -- plain go test passed, task check (which adds -race and golangci-lint) didn't. --- ingestion/internal/api/handler.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ingestion/internal/api/handler.go b/ingestion/internal/api/handler.go index 7156151..7ed0fed 100644 --- a/ingestion/internal/api/handler.go +++ b/ingestion/internal/api/handler.go @@ -240,15 +240,7 @@ func (h *Handler) Write(w http.ResponseWriter, r *http.Request) { writeError(w, http.StatusBadRequest, "invalid JSON") return } - relPath, err := WriteNote(h.brainDir, WriteNoteOptions{ - Content: req.Content, - Filename: req.Filename, - Type: req.Type, - Domain: req.Domain, - Wing: req.Wing, - Hall: req.Hall, - SourceType: req.SourceType, - }) + relPath, err := WriteNote(h.brainDir, WriteNoteOptions(req)) if err != nil { h.logger.Error("write failed", "err", err) writeError(w, http.StatusBadRequest, err.Error())