style: make linter happy
This commit is contained in:
parent
886c9dffa8
commit
20a47d9abc
6 changed files with 34 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue