From ba90cc3c1f583c261bc774bea13ec991448a9045 Mon Sep 17 00:00:00 2001 From: "Ciro S. Costa" Date: Mon, 18 Nov 2019 12:08:24 -0500 Subject: [PATCH] worker: Remove type casting in NewContainer call * Because the type has the same interface as map[string]string, Go is happy to use the named type or the underlying type Signed-off-by: Denise Yu --- worker/backend/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/backend/backend.go b/worker/backend/backend.go index 14abd0f16..88db9accf 100644 --- a/worker/backend/backend.go +++ b/worker/backend/backend.go @@ -78,7 +78,7 @@ func (b *Backend) Create(gdnSpec garden.ContainerSpec) (container garden.Contain } cont, err := b.client.NewContainer(ctx, - gdnSpec.Handle, map[string]string(gdnSpec.Properties), oci, + gdnSpec.Handle, gdnSpec.Properties, oci, ) if err != nil { err = fmt.Errorf("failed to create a container in containerd: %w", err)