From b97e7e1281bc33b873532938495aa02ed5cbb418 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 14 Jul 2026 20:06:44 -0500 Subject: fix: restore optional username in PerformSearch, apply gofmt The golangci-lint cleanup added a top-level `user == nil` guard to PerformSearch, but `user` is variadic and only required for the 'g' and 'f' scopes. The guard made every 'a'/'t' search fail with "missing username" before issuing a request, breaking general search for all callers. The correctly scoped check inside the 'g','f' case already covers the case that needs it. Also run gofmt: the same cleanup introduced space indentation in deviantion.go, user-group.go, and util.go, which fails the gofmt CI step. --- misc.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'misc.go') diff --git a/misc.go b/misc.go index 8e6c5aa..6b34050 100644 --- a/misc.go +++ b/misc.go @@ -81,11 +81,6 @@ type Search struct { func PerformSearch(query string, page int, scope rune, user ...string) (ss Search, daError Error, err error) { var buildurl strings.Builder - if user == nil { - err = errors.New("missing username (last argument)") - return - } - // о5 построение ссылок. switch scope { case 'a': // поиск артов по названию -- cgit v1.2.3