fix: resolve golangci-lint errcheck warnings
- Add error checks for unchecked return values (errcheck) - Remove unused struct fields (unused) - Fix gofmt formatting issues
This commit is contained in:
6
main.go
6
main.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user