mirror of
https://codeberg.org/lauralani/ipam.git
synced 2024-11-24 04:30:02 +01:00
mostly whitespace changes
This commit is contained in:
parent
9f8c8f7e29
commit
2db0e27223
5 changed files with 33 additions and 33 deletions
|
@ -63,7 +63,7 @@ func initConfig() {
|
||||||
viper.SetConfigType("yaml")
|
viper.SetConfigType("yaml")
|
||||||
|
|
||||||
viper.SetDefault("DataPath", ipamdir+"data/")
|
viper.SetDefault("DataPath", ipamdir+"data/")
|
||||||
viper.SetDefault("EnablePowerDNS", false)
|
viper.SetDefault("PowerDNSEnabled", false)
|
||||||
viper.SetDefault("PowerDNSEndpoint", "")
|
viper.SetDefault("PowerDNSEndpoint", "")
|
||||||
viper.SetDefault("PowerDNSApiKey", "")
|
viper.SetDefault("PowerDNSApiKey", "")
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ var subnetlistCmd = &cobra.Command{
|
||||||
Args: cobra.ExactArgs(0),
|
Args: cobra.ExactArgs(0),
|
||||||
Example: "cmdb subnet list",
|
Example: "cmdb subnet list",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
verbose, _ := cmd.Flags().GetBool("verbose")
|
//verbose, _ := cmd.Flags().GetBool("verbose")
|
||||||
subnetlist := ListSubnets()
|
subnetlist := ListSubnets()
|
||||||
var subnets []Subnet
|
var subnets []Subnet
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ var subnetlistCmd = &cobra.Command{
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, subnet := range subnets {
|
for _, subnet := range subnets {
|
||||||
if verbose {
|
//if verbose {
|
||||||
var numip, freeip int
|
var numip, freeip int
|
||||||
|
|
||||||
if subnet.Subnet.Addr().Is4() {
|
if subnet.Subnet.Addr().Is4() {
|
||||||
|
@ -52,9 +52,9 @@ var subnetlistCmd = &cobra.Command{
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("%v:\t%v\t(vl: %v)\n", subnet.Subnet, subnet.Name, subnet.Vlan)
|
fmt.Printf("%v:\t%v\t(vl: %v)\n", subnet.Subnet, subnet.Name, subnet.Vlan)
|
||||||
}
|
}
|
||||||
} else {
|
//} else {
|
||||||
fmt.Printf("%v:\t%v\t(vl: %v)\n", subnet.Subnet, subnet.Name, subnet.Vlan)
|
// fmt.Printf("%v:\t%v\t(vl: %v)\n", subnet.Subnet, subnet.Name, subnet.Vlan)
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -71,5 +71,5 @@ func init() {
|
||||||
|
|
||||||
// Cobra supports local flags which will only run when this command
|
// Cobra supports local flags which will only run when this command
|
||||||
// is called directly, e.g.:
|
// is called directly, e.g.:
|
||||||
subnetlistCmd.Flags().BoolP("verbose", "v", false, "Show verbose output like free IPs")
|
// subnetlistCmd.Flags().BoolP("verbose", "v", false, "Show verbose output like free IPs")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue