Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishekism9450 committed Jun 29, 2022
1 parent 0a21b05 commit 9f2daa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions nutanix/data_source_nutanix_static_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func dataSourceNutanixStaticRouteRead(ctx context.Context, d *schema.ResourceDat
func flattenStaticRouteSpec(stat *v3.StaticRouteSpec) []interface{} {
statList := make([]interface{}, 0)
if stat != nil {
stats := make(map[string]interface{}, 0)
stats := make(map[string]interface{})

stats["name"] = stat.Name
stats["resources"] = flattenStaticRouteSpecResources(stat.Resources)
Expand Down Expand Up @@ -217,7 +217,7 @@ func flattenStaticRouteStatus(srs *v3.StaticRouteDefStatus) []interface{} {
func flattenStaticRouteSpecResources(pr *v3.StaticRouteResources) []interface{} {
prList := make([]interface{}, 0)
if pr != nil {
stats := make(map[string]interface{}, 0)
stats := make(map[string]interface{})

stats["static_routes_list"] = flattenSpecStaticRouteList(pr.StaticRoutesList)

Expand Down
8 changes: 4 additions & 4 deletions nutanix/resource_nutanix_static_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func resourceNutanixStaticRouteCreate(ctx context.Context, d *schema.ResourceDat
}
}

if err := getMetadataAttributes(d, metadata, "vpc_route_table"); err != nil {
return diag.Errorf("error reading metadata for VPC Route table %s", err)
if er := getMetadataAttributes(d, metadata, "vpc_route_table"); er != nil {
return diag.Errorf("error reading metadata for VPC Route table %s", er)
}

if stat, ok := d.GetOk("static_routes_list"); ok {
Expand Down Expand Up @@ -176,8 +176,8 @@ func resourceNutanixStaticRouteUpdate(ctx context.Context, d *schema.ResourceDat
}
}

if err := getMetadataAttributes(d, metadata, "vpc_route_table"); err != nil {
return diag.Errorf("error reading metadata for VPC Route table %s", err)
if er := getMetadataAttributes(d, metadata, "vpc_route_table"); er != nil {
return diag.Errorf("error reading metadata for VPC Route table %s", er)
}

if d.HasChange("static_routes_list") {
Expand Down

0 comments on commit 9f2daa2

Please sign in to comment.