From 235aa114dffc784073ec8b2f88fbd4ecfba06450 Mon Sep 17 00:00:00 2001 From: cormick Date: Wed, 16 Oct 2024 10:37:17 +0800 Subject: [PATCH] chore: remove unreachable code and fmt files Signed-off-by: cormick --- plugins/device-injector/device-injector.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/device-injector/device-injector.go b/plugins/device-injector/device-injector.go index c355e96..a92aa1a 100644 --- a/plugins/device-injector/device-injector.go +++ b/plugins/device-injector/device-injector.go @@ -88,8 +88,6 @@ func (p *plugin) CreateContainer(_ context.Context, pod *api.PodSandbox, ctr *ap return nil, nil, err } - return adjust, nil, nil - if verbose { dump(containerName(pod, ctr), "ContainerAdjustment", adjust) } @@ -132,10 +130,6 @@ func parseDevices(ctr string, annotations map[string]string) ([]device, error) { return nil, nil } - if annotation == nil { - return nil, nil - } - if err := yaml.Unmarshal(annotation, &devices); err != nil { return nil, fmt.Errorf("invalid device annotation %q: %w", string(annotation), err) }