From 29c40f448cc599f24b6f298cd726aa8a31b9f276 Mon Sep 17 00:00:00 2001 From: RXWatcher <14085001+RXWatcher@users.noreply.github.com> Date: Tue, 26 May 2026 14:00:01 +0200 Subject: [PATCH] chore(audiobooks): drop unused parseBookmarkTime from bookmark handler The helper was added in advance of the DELETE handler (next task in the plan) but is unused in this commit, which trips golangci-lint's unused check. Reintroduce it together with its first caller. Co-Authored-By: Claude Opus 4.7 (1M context) --- internal/audiobooks/abs/bookmarks_handler.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/internal/audiobooks/abs/bookmarks_handler.go b/internal/audiobooks/abs/bookmarks_handler.go index 541edaa1..2bae9c3e 100644 --- a/internal/audiobooks/abs/bookmarks_handler.go +++ b/internal/audiobooks/abs/bookmarks_handler.go @@ -6,7 +6,6 @@ import ( "log/slog" "math" "net/http" - "strconv" "github.com/go-chi/chi/v5" ) @@ -95,16 +94,3 @@ func writeBookmarkList(w http.ResponseWriter, r *http.Request, h *Handler, userI writeJSON(w, http.StatusOK, out) } -// parseBookmarkTime parses the {time} URL parameter on DELETE -// /me/item/{itemId}/bookmark/{time}. Returns (0, false) on parse -// failure. -func parseBookmarkTime(s string) (float64, bool) { - if s == "" { - return 0, false - } - v, err := strconv.ParseFloat(s, 64) - if err != nil || math.IsNaN(v) { - return 0, false - } - return v, true -}