perf: Remove redundant fmt.Sprintf in tempproxy contains function

The fmt.Sprintf("%v", s) call was pointless since s is already a string.
Removing this unnecessary conversion.
This commit is contained in:
rcourtman 2025-12-02 15:24:40 +00:00
parent b47a04aa97
commit f383cf8ddf

View file

@ -213,7 +213,6 @@ func classifyError(err error, respError string) *ProxyError {
// contains checks if any of the substrings are in the main string (case-insensitive)
func contains(s string, substrs ...string) bool {
s = fmt.Sprintf("%v", s)
for _, substr := range substrs {
if len(s) >= len(substr) {
for i := 0; i <= len(s)-len(substr); i++ {