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)
     			^
This commit is contained in:
Patrick Ohly 2023-10-26 21:21:28 +02:00
parent 4aea803f3f
commit af14f97cba

View File

@ -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 {