From af14f97cba73e94d6e8a90f236515ee6090aedb0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 26 Oct 2023 21:21:28 +0200 Subject: [PATCH] sample device plugin: fix incorrect Errorf invocation Linting together with an upcoming klog update finds this problem: test/images/sample-device-plugin/sampledeviceplugin.go:165:4: printf: k8s.io/klog/v2.Errorf does not support error-wrapping directive %w (govet) klog.Errorf("Failed to add watch to %q: %w", triggerPath, err) ^ --- test/images/sample-device-plugin/sampledeviceplugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/images/sample-device-plugin/sampledeviceplugin.go b/test/images/sample-device-plugin/sampledeviceplugin.go index ccdb0c7a9ab..3e346686f09 100644 --- a/test/images/sample-device-plugin/sampledeviceplugin.go +++ b/test/images/sample-device-plugin/sampledeviceplugin.go @@ -162,7 +162,7 @@ func main() { err = watcher.Add(triggerPath) if err != nil { - klog.Errorf("Failed to add watch to %q: %w", triggerPath, err) + klog.Errorf("Failed to add watch to %q: %v", triggerPath, err) panic(err) } for {