Skip to content

Commit c2d1a7e

Browse files
committed
Fix feature gate logging unhashable hash problem
Signed-off-by: Tayler Geiger <[email protected]>
1 parent 588ab97 commit c2d1a7e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/operator-controller/features/features.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package features
22

33
import (
4-
"fmt"
54
"sort"
65

76
"github.com/go-logr/logr"
@@ -52,9 +51,9 @@ func LogFeatureGateStates(log logr.Logger, fg featuregate.FeatureGate) {
5251
return string(featureKeys[i]) < string(featureKeys[j]) // Sort by string representation
5352
})
5453

55-
featurePairs := make([]string, 0, len(featureKeys))
54+
featurePairs := make([]interface{}, 0, len(featureKeys))
5655
for _, feature := range featureKeys {
57-
featurePairs = append(featurePairs, string(feature), fmt.Sprintf("%v", fg.Enabled(feature)))
56+
featurePairs = append(featurePairs, feature, fg.Enabled(feature))
5857
}
59-
log.Info("feature gate status", featurePairs)
58+
log.Info("feature gate status", featurePairs...)
6059
}

0 commit comments

Comments
 (0)