Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nopg committed Mar 23, 2023
1 parent 09c5559 commit 13e5115
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 13e5115

Please sign in to comment.