style: make linter happy

This commit is contained in:
Tom Neuber 2024-06-19 22:07:51 +02:00
parent 886c9dffa8
commit 20a47d9abc
Signed by: tom
GPG key ID: F17EFE4272D89FF6
6 changed files with 34 additions and 6 deletions

View file

@ -47,15 +47,18 @@ func (c *Client) Search(ctx context.Context, params ...SearchParam) ([]FoundBoar
)
u := url.URL{}
q := u.Query()
for _, p := range params {
p(&q)
}
if raw, code, err = c.get(ctx, "api/search", q); err != nil {
return nil, err
}
if code != 200 {
return nil, fmt.Errorf("HTTP error %d: returns %s", code, raw)
}
err = json.Unmarshal(raw, &boards)
return boards, err
}