You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message: fmt.Sprintf("Key positional arguments %s are expected to be lowerCamelCase alphanumeric strings. Please remove any non-Latin characters.", lit.Value),
Copy file name to clipboardexpand all lines: hack/tools/logcheck/testdata/data.go
+9-6
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,13 @@ func printUnstructuredLog() {
44
44
funcprintStructuredLog() {
45
45
klog.InfoS("test log")
46
46
klog.ErrorS(nil, "test log")
47
-
klog.InfoS("Starting container in a pod", "containerID", "containerID", "pod") // want `Invalid Number of arguments for InfoS`
48
-
klog.ErrorS(nil, "Starting container in a pod", "containerID", "containerID", "pod") // want `Invalid Number of arguments for ErrorS`
49
-
klog.InfoS("Starting container in a pod", "测试", "containerID") // want `Invalid value for key`
50
-
klog.ErrorS(nil, "Starting container in a pod", "测试", "containerID") // want `Invalid value for key`
51
-
klog.InfoS("Starting container in a pod", 7, "containerID") // want `Invalid value type for key 7`
52
-
klog.ErrorS(nil, "Starting container in a pod", 7, "containerID") // want `Invalid value type for key 7`
47
+
klog.InfoS("Starting container in a pod", "containerID", "containerID", "pod") // want `Additional arguments to InfoS should always be Key Value pairs. Please check if there is any key or value missing.`
48
+
klog.ErrorS(nil, "Starting container in a pod", "containerID", "containerID", "pod") // want `Additional arguments to ErrorS should always be Key Value pairs. Please check if there is any key or value missing.`
49
+
klog.InfoS("Starting container in a pod", "测试", "containerID") // want `Key positional arguments "测试" are expected to be lowerCamelCase alphanumeric strings. Please remove any non-Latin characters.`
50
+
klog.ErrorS(nil, "Starting container in a pod", "测试", "containerID") // want `Key positional arguments "测试" are expected to be lowerCamelCase alphanumeric strings. Please remove any non-Latin characters.`
51
+
klog.InfoS("Starting container in a pod", 7, "containerID") // want `Key positional arguments are expected to be inlined constant strings. Please replace 7 provided with string value`
52
+
klog.ErrorS(nil, "Starting container in a pod", 7, "containerID") // want `Key positional arguments are expected to be inlined constant strings. Please replace 7 provided with string value`
53
+
klog.InfoS("Starting container in a pod", map[string]string{"test1": "value"}, "containerID") // want `Key positional arguments are expected to be inlined constant strings. `
54
+
testKey:="a"
55
+
klog.ErrorS(nil, "Starting container in a pod", testKey, "containerID") // want `Key positional arguments are expected to be inlined constant strings. `
0 commit comments