cmd/pkgserver: satisfy handler signature in method

This is somewhat cleaner.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-11 02:18:21 +09:00
parent 112c32fee2
commit e130443cf4
2 changed files with 69 additions and 73 deletions

View File

@@ -18,7 +18,7 @@ func TestAPIInfo(t *testing.T) {
t.Parallel()
w := httptest.NewRecorder()
serveInfo(w, httptest.NewRequestWithContext(
handleInfo(w, httptest.NewRequestWithContext(
t.Context(),
http.MethodGet,
prefix+"info",
@@ -42,7 +42,7 @@ func TestAPIGet(t *testing.T) {
index := newIndex(t)
newRequest := func(suffix string) *httptest.ResponseRecorder {
w := httptest.NewRecorder()
index.serveGet()(w, httptest.NewRequestWithContext(
index.handleGet(w, httptest.NewRequestWithContext(
t.Context(),
http.MethodGet,
target+suffix,