fix: resolve wsl_v5 lint issues

This commit is contained in:
user
2026-02-20 03:14:46 -08:00
parent ed96c6ccde
commit 3adc5479b7
3 changed files with 9 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ func (c *Client) PollMessages(afterID string, timeout int) ([]Message, error) {
if err := json.Unmarshal(data, &msgs); err != nil {
// Try wrapped format.
var wrapped MessagesResponse
err2 := json.Unmarshal(data, &wrapped)
if err2 != nil {
return nil, fmt.Errorf("decode messages: %w (raw: %s)", err, string(data))
@@ -199,6 +200,7 @@ func (c *Client) GetMembers(channel string) ([]string, error) {
if err := json.Unmarshal(data, &members); err != nil {
// Try object format.
var obj map[string]any
err2 := json.Unmarshal(data, &obj)
if err2 != nil {
return nil, err