Skip to content

Commit 0baf8c5

Browse files
committed
Fix lint
1 parent 7eebf0b commit 0baf8c5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

models/repo/repo_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ func GetRepositoriesIDsByFullNames(ctx context.Context, fullRepoNames []string)
778778
return nil, nil
779779
}
780780

781-
var cond builder.Cond = builder.NewCond()
781+
cond := builder.NewCond()
782782
for _, name := range fullRepoNames {
783783
ownerName, repoName, ok := strings.Cut(name, "/")
784784
if !ok {

routers/api/v1/repo/code/search.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
14
package code
25

36
import (

tests/integration/api_search_code_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func TestAPISearchCodeNotLogin(t *testing.T) {
1919

2020
// test with no keyword
2121
req := NewRequest(t, "GET", "/api/v1/search/code")
22-
resp := MakeRequest(t, req, http.StatusUnprocessableEntity)
22+
MakeRequest(t, req, http.StatusUnprocessableEntity)
2323

2424
req = NewRequest(t, "GET", "/api/v1/search/code?q=Description")
25-
resp = MakeRequest(t, req, http.StatusOK)
25+
resp := MakeRequest(t, req, http.StatusOK)
2626

2727
var apiCodeSearchResults api.CodeSearchResults
2828
DecodeJSON(t, resp, &apiCodeSearchResults)

0 commit comments

Comments
 (0)