From 13e5115294f0f0789eec16fc540551ec4f6e3d0c Mon Sep 17 00:00:00 2001 From: Ryan Gillespie Date: Thu, 23 Mar 2023 01:19:25 -0600 Subject: [PATCH] tweaks --- main.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index bd63d40..f8d66e5 100644 --- a/main.go +++ b/main.go @@ -30,12 +30,11 @@ func cleanup(c *cli.Context) error { continue } // Confirm with user before deleting, unless noconfirm set - for { - if c.Bool("noconfirm") == true { - cvpClient.API.DeleteConfiglet(let.Name, let.Key) - fmt.Printf("Deleted %s!\n", let.Name) - break - } else { + if c.Bool("noconfirm") == true { + cvpClient.API.DeleteConfiglet(let.Name, let.Key) + fmt.Printf("Deleted %s!\n", let.Name) + } else { + for { fmt.Printf("Delete %s ? (y/n): ", let.Name) response, err := reader.ReadString('\n') if err != nil { @@ -65,7 +64,6 @@ func login(c *cli.Context) error { ip := c.String("ip") user := c.String("user") password := c.String("password") - fmt.Println(ip, user, password) hosts := []string{ip} cvpClient, _ := client.NewCvpClient(