fix: resolve golangci-lint errcheck warnings
Some checks failed
CI / Test (push) Has been cancelled
CI / Release (push) Has been cancelled
CI / Docker Build & Push (push) Has been cancelled
CI / Notify (push) Has been cancelled
CI / Lint (push) Has been cancelled

- Add error checks for unchecked return values (errcheck)
- Remove unused struct fields (unused)
- Fix gofmt formatting issues
This commit is contained in:
2026-02-20 08:45:42 -05:00
parent 3dff04ad95
commit ef52519d4d
3 changed files with 35 additions and 35 deletions

View File

@@ -262,7 +262,7 @@ func main() {
if err != nil {
return nil, fmt.Errorf("xtts request: %w", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode >= 400 {
respBody, _ := io.ReadAll(resp.Body)
@@ -370,7 +370,7 @@ func main() {
}
packed, _ := msgpack.Marshal(resp)
if msg.Reply != "" {
msg.Respond(packed)
_ = msg.Respond(packed)
}
}); err != nil {
slog.Error("subscribe voices list failed", "error", err)
@@ -386,7 +386,7 @@ func main() {
}
packed, _ := msgpack.Marshal(resp)
if msg.Reply != "" {
msg.Respond(packed)
_ = msg.Respond(packed)
}
slog.Info("voice registry refreshed on demand", "count", count)
}); err != nil {