From a4087a538fcf950bc4c6ab0b754d7bf5cc379600 Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Thu, 21 Jul 2022 14:51:27 -0700 Subject: [PATCH] Use map[psaApi.level] instead of map[string] --- cmd/migrate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index f853983..aeefdfa 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -87,7 +87,7 @@ var MigrateCmd = &cobra.Command{ namespace.Name, namespace.Labels) continue } - suggestions := make(map[string]bool) + suggestions := make(map[psaApi.Level]bool) podList, err := GetPodsByNamespace(namespace.Name) if err != nil { log.Printf("Error getting pods for namespace %v. Error: %v\n", namespace.Name, err.Error()) @@ -106,7 +106,7 @@ var MigrateCmd = &cobra.Command{ fmt.Println("Continuing with the next namespace due to error with ", namespace.Name) continue } - suggestions[string(level)] = true + suggestions[level] = true } var suggested psaApi.Level if suggestions["restricted"] {