From f13f7b7fc604ee3569fc6bc682cd8799e72bc1c0 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Mon, 25 May 2026 01:15:39 +0200 Subject: [PATCH] style: fix gofmt indentation --- integrations/watchorder/watch_order_test.go | 26 ++++++++++----------- internal/db/command_palette.go | 16 ++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/integrations/watchorder/watch_order_test.go b/integrations/watchorder/watch_order_test.go index 8942602..147f000 100644 --- a/integrations/watchorder/watch_order_test.go +++ b/integrations/watchorder/watch_order_test.go @@ -138,19 +138,19 @@ Jujutsu Kaisen 0 Dec 24, 2021 | Movie | 1ep × 1hr. 44min. | ★8.36 | [](https://myanimelist.net/anime/48561) ` - testClient := &http.Client{ - Timeout: time.Second, - Transport: roundTripFunc(func(request *http.Request) (*http.Response, error) { - switch request.URL.Host { - case "chiaki.site": - return mockResponse(http.StatusForbidden, map[string]string{"Content-Type": "text/html; charset=utf-8"}, "blocked"), nil - case "r.jina.ai": - // Proxy response is plain text/markdown. - return mockResponse(http.StatusOK, map[string]string{"Content-Type": "text/plain; charset=utf-8"}, proxyPayload), nil - default: - return mockResponse(http.StatusNotFound, nil, "not found"), nil - } - }), + testClient := &http.Client{ + Timeout: time.Second, + Transport: roundTripFunc(func(request *http.Request) (*http.Response, error) { + switch request.URL.Host { + case "chiaki.site": + return mockResponse(http.StatusForbidden, map[string]string{"Content-Type": "text/html; charset=utf-8"}, "blocked"), nil + case "r.jina.ai": + // Proxy response is plain text/markdown. + return mockResponse(http.StatusOK, map[string]string{"Content-Type": "text/plain; charset=utf-8"}, proxyPayload), nil + default: + return mockResponse(http.StatusNotFound, nil, "not found"), nil + } + }), } result, err := FetchWatchOrder(context.Background(), testClient, "https://chiaki.site/?/tools/watch_order/id/40748") diff --git a/internal/db/command_palette.go b/internal/db/command_palette.go index 1f47315..59550cc 100644 --- a/internal/db/command_palette.go +++ b/internal/db/command_palette.go @@ -41,10 +41,10 @@ WHERE c.user_id = ? ) ORDER BY c.updated_at DESC LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit) - if err != nil { - return nil, err - } - defer func() { _ = rows.Close() }() + if err != nil { + return nil, err + } + defer func() { _ = rows.Close() }() items := make([]GetContinueWatchingEntriesRow, 0, int(limit)) for rows.Next() { @@ -119,10 +119,10 @@ ORDER BY END, e.updated_at DESC LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit) - if err != nil { - return nil, err - } - defer func() { _ = rows.Close() }() + if err != nil { + return nil, err + } + defer func() { _ = rows.Close() }() items := make([]GetUserWatchListRow, 0, int(limit)) for rows.Next() {