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
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"k8s.io/apimachinery/pkg/util/rand"
)
func FNVHashStringObjects(objs ...interface{}) string {
func FNVHashStringObjects(objs ...any) string {
hash := fnv.New32a()
for _, obj := range objs {
+2 -2
View File
@@ -16,7 +16,7 @@ import (
// DeepHashObject writes specified object to hash using the spew library
// which follows pointers and prints actual values of the nested objects
// ensuring the hash does not change when a pointer changes.
func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) {
func DeepHashObject(hasher hash.Hash, objectToWrite any) {
hasher.Reset()
printer := spew.ConfigState{
Indent: " ",
@@ -34,7 +34,7 @@ func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) {
//
// Proudly modified and adopted from k8s.io/kubernetes/pkg/util/hash.DeepHashObject and
// k8s.io/kubernetes/pkg/controller.ComputeHash.
func ComputeTemplateHash(template interface{}) string {
func ComputeTemplateHash(template any) string {
hasher := fnv.New32a()
hasher.Reset()