Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Fix list bug with types and filters #23

Merged
merged 1 commit into from
Jun 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
}
Expand Down