Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-kulshrestha committed Mar 15, 2022
1 parent eb1dbb7 commit d5758bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nutanix/resource_nutanix_network_security_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ func expandNetworkRule(prefix string, d *schema.ResourceData) *v3.NetworkSecurit
for k, v := range oal {
nr := v.(map[string]interface{})
nrItem := &v3.NetworkRule{}
setIpSubnet := false
setIPSubnet := false
iPSubnet := &v3.IPSubnet{}
filter := &v3.CategoryFilter{}

Expand All @@ -1149,17 +1149,17 @@ func expandNetworkRule(prefix string, d *schema.ResourceData) *v3.NetworkSecurit

if ip, ipok := nr["ip_subnet"]; ipok && ip.(string) != "" {
iPSubnet.IP = utils.StringPtr(ip.(string))
setIpSubnet = true
setIPSubnet = true
}

if ippl, ipok := nr["ip_subnet_prefix_length"]; ipok && ippl.(string) != "" {
if i, err := strconv.Atoi(ippl.(string)); err == nil {
iPSubnet.PrefixLength = utils.Int64Ptr(int64(i))
setIpSubnet = true
setIPSubnet = true
}
}

if setIpSubnet {
if setIPSubnet {
nrItem.IPSubnet = iPSubnet
}

Expand Down

0 comments on commit d5758bd

Please sign in to comment.