From 832378f1202c02c95b7376bb5a4e5a0a20d9f5d5 Mon Sep 17 00:00:00 2001 From: Dj Walker-Morgan Date: Wed, 13 Jun 2018 15:43:53 +0100 Subject: [PATCH] Fix list bug with types and filters --- cmd/list.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/list.go b/cmd/list.go index 5669138..c7b8898 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -41,7 +41,7 @@ var listCmd = &cobra.Command{ deployments, errs := c.GetDeployments() bailOnErrs(errs) - matcher, err := regexp.Compile(filter) + matcher, err := regexp.Compile(listfilter) if err != nil { log.Fatal(err) } @@ -51,7 +51,7 @@ var listCmd = &cobra.Command{ fmt.Printf("%-24s %-14s %-40s\n", strings.Repeat("-", 24), strings.Repeat("-", 14), strings.Repeat("-", 40)) for _, v := range *deployments { - if (dbtype == "" || dbtype == v.Type) && matcher.MatchString(v.Name) { + if (listdbtype == "" || listdbtype == v.Type) && matcher.MatchString(v.Name) { fmt.Printf("%-24s %-14s %-40s\n", v.ID, v.Type, v.Name) } }