fix: resolve golangci-lint issues

- Fix errcheck: defer rows.Close() with nolint
- Fix errcheck: type assertion with ok check in channel cache
- Fix staticcheck ST1005: lowercase error string
- Fix staticcheck SA5011: nil check cost before use in openai gateway
- Fix gofmt: format chatcompletions_to_responses.go
This commit is contained in:
erio committed 2026-04-01 16:30:47 +08:00
1 parent a1216b8839
commit 6af5b9ff9c
5 files changed
+29 -23

No files matched your search

@@ -230,7 +230,7 @@ func validatePricingBillingMode(pricing []service.ChannelModelPricing) error {
for _, p := range pricing {
if p.BillingMode == service.BillingModePerRequest || p.BillingMode == service.BillingModeImage {
if p.PerRequestPrice == nil && len(p.Intervals) == 0 {
return errors.New("Per-request price or intervals required for per_request/image billing mode")
return errors.New("per-request price or intervals required for per_request/image billing mode")
}
}
}