style: fix gofmt indentation

This commit is contained in:
2026-05-25 01:15:39 +02:00
parent e0749066ec
commit f13f7b7fc6
2 changed files with 21 additions and 21 deletions

View File

@@ -138,19 +138,19 @@ Jujutsu Kaisen 0
Dec 24, 2021 | Movie | 1ep × 1hr. 44min. | ★8.36 | [](https://myanimelist.net/anime/48561) Dec 24, 2021 | Movie | 1ep × 1hr. 44min. | ★8.36 | [](https://myanimelist.net/anime/48561)
` `
testClient := &http.Client{ testClient := &http.Client{
Timeout: time.Second, Timeout: time.Second,
Transport: roundTripFunc(func(request *http.Request) (*http.Response, error) { Transport: roundTripFunc(func(request *http.Request) (*http.Response, error) {
switch request.URL.Host { switch request.URL.Host {
case "chiaki.site": case "chiaki.site":
return mockResponse(http.StatusForbidden, map[string]string{"Content-Type": "text/html; charset=utf-8"}, "blocked"), nil return mockResponse(http.StatusForbidden, map[string]string{"Content-Type": "text/html; charset=utf-8"}, "blocked"), nil
case "r.jina.ai": case "r.jina.ai":
// Proxy response is plain text/markdown. // Proxy response is plain text/markdown.
return mockResponse(http.StatusOK, map[string]string{"Content-Type": "text/plain; charset=utf-8"}, proxyPayload), nil return mockResponse(http.StatusOK, map[string]string{"Content-Type": "text/plain; charset=utf-8"}, proxyPayload), nil
default: default:
return mockResponse(http.StatusNotFound, nil, "not found"), nil return mockResponse(http.StatusNotFound, nil, "not found"), nil
} }
}), }),
} }
result, err := FetchWatchOrder(context.Background(), testClient, "https://chiaki.site/?/tools/watch_order/id/40748") result, err := FetchWatchOrder(context.Background(), testClient, "https://chiaki.site/?/tools/watch_order/id/40748")

View File

@@ -41,10 +41,10 @@ WHERE c.user_id = ?
) )
ORDER BY c.updated_at DESC ORDER BY c.updated_at DESC
LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit) LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer func() { _ = rows.Close() }() defer func() { _ = rows.Close() }()
items := make([]GetContinueWatchingEntriesRow, 0, int(limit)) items := make([]GetContinueWatchingEntriesRow, 0, int(limit))
for rows.Next() { for rows.Next() {
@@ -119,10 +119,10 @@ ORDER BY
END, END,
e.updated_at DESC e.updated_at DESC
LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit) LIMIT ?`, userID, needle, pattern, pattern, pattern, pattern, limit)
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer func() { _ = rows.Close() }() defer func() { _ = rows.Close() }()
items := make([]GetUserWatchListRow, 0, int(limit)) items := make([]GetUserWatchListRow, 0, int(limit))
for rows.Next() { for rows.Next() {