Skip to content

Commit cee726f

Browse files
authored
Fix non-constant format string lint errors in proxy handler (#3415)
## Summary Fixes the failing `lint` GitHub Actions workflow (job ID `70548695541`) caused by `go vet` detecting non-constant format strings. ## Changes - `internal/proxy/handler.go:144`: Changed `logHandler.Printf(errMsg)` → `logHandler.Print(errMsg)` (uses the non-format variant) - `internal/proxy/handler.go:145`: Changed `logger.LogError("proxy", errMsg)` → `logger.LogError("proxy", "%s", errMsg)` (wraps variable in `%s` format specifier) ## Verification - `make agent-finished` passes (format, build, lint, all tests)
2 parents 67c4c38 + 5007a6c commit cee726f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/proxy/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ func (h *proxyHandler) handleWithDIFC(w http.ResponseWriter, r *http.Request, pa
141141

142142
if !s.guardInitialized {
143143
errMsg := "returning 503: proxy enforcement not configured (no --policy flag provided)"
144-
logHandler.Printf(errMsg)
145-
logger.LogError("proxy", errMsg)
144+
logHandler.Print(errMsg)
145+
logger.LogError("proxy", "%s", errMsg)
146146
http.Error(w, "proxy enforcement not configured", http.StatusServiceUnavailable)
147147
return
148148
}

0 commit comments

Comments
 (0)