fix(网关): 修复 golangci-lint

This commit is contained in:
cyhhao
2026-01-17 00:27:36 +08:00
parent 0c011b889b
commit 8917a3ea8f

View File

@@ -439,7 +439,7 @@ func toPascalCase(value string) string {
}
runes := []rune(lower)
runes[0] = unicode.ToUpper(runes[0])
builder.WriteString(string(runes))
_, _ = builder.WriteString(string(runes))
}
return builder.String()
}
@@ -723,12 +723,8 @@ func normalizeClaudeOAuthRequestBody(body []byte, modelID string, opts claudeOAu
}
}
if _, ok := req["temperature"]; ok {
delete(req, "temperature")
}
if _, ok := req["tool_choice"]; ok {
delete(req, "tool_choice")
}
newBody, err := json.Marshal(req)
if err != nil {