mirror of
https://codeberg.org/lauralani/ipam.git
synced 2024-11-24 04:30:02 +01:00
fix error with subnet deletion checks
This commit is contained in:
parent
92118a60aa
commit
e7786e1822
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,11 @@ var subnetdeleteCmd = &cobra.Command{
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !SubnetExists(subnet) {
|
||||||
|
fmt.Printf("[ERROR] Couldn't find subnet %v\n", subnet.String())
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
var confirmation string
|
var confirmation string
|
||||||
fmt.Printf("[WARNING] Do you really want to delete subnet %v? [y/N] ", subnet.String())
|
fmt.Printf("[WARNING] Do you really want to delete subnet %v? [y/N] ", subnet.String())
|
||||||
fmt.Scan(&confirmation)
|
fmt.Scan(&confirmation)
|
||||||
|
|
Loading…
Reference in a new issue