Read the e2e Go version from go.mod and apply the safe go fix modernizers (#4677)

This commit is contained in:
Junya Okabe
2026-10-02 14:23:15 +02:00
committed by GitHub
parent 1945b42820
commit 5aed393af8
12 changed files with 50 additions and 32 deletions
+2 -6
View File
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"os"
"slices"
"strconv"
"time"
@@ -78,10 +79,5 @@ func NewLogger(logLevel string, logFormat string) (logr.Logger, error) {
func validLogFormat(logFormat string) bool {
validFormat := []string{"text", "json"}
for _, v := range validFormat {
if v == logFormat {
return true
}
}
return false
return slices.Contains(validFormat, logFormat)
}
+1 -1
View File
@@ -35,7 +35,7 @@ func (t Transport) log(req *http.Request, resp *http.Response) {
return
}
var args []interface{}
var args []any
marked := resp.Header.Get(httpcache.XFromCache) == "1"