From 3fd81a655a24bef6b0ccd433a059996c102469ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20L=C3=B3pez?= Date: Fri, 15 May 2020 14:10:03 -0500 Subject: [PATCH] refactor: changed to make it work for lint --- .golangci.yml | 3 ++- nutanix/data_source_protection_rule.go | 6 ++++-- nutanix/resource_nutanix_protection_rule.go | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9c0f533fa..cdb0a0048 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,7 +22,7 @@ linters-settings: # also, for anyone using vscode, use the following configs: # "rewrap.wrappingColumn": 140 ... requires the rewrap plugin # "editor.rulers": [140] - line-length: 140 + line-length: 150 linters: enable-all: true @@ -48,6 +48,7 @@ linters: - wsl - nestif - godot + - goconst issues: exclude: diff --git a/nutanix/data_source_protection_rule.go b/nutanix/data_source_protection_rule.go index f317f20c0..ecf69cc36 100644 --- a/nutanix/data_source_protection_rule.go +++ b/nutanix/data_source_protection_rule.go @@ -276,10 +276,12 @@ func dataSourceNutanixProtectionRuleRead(d *schema.ResourceData, meta interface{ if err := d.Set("category_filter", flattenCategoriesFilter(resp.Spec.Resources.CategoryFilter)); err != nil { return err } - if err := d.Set("availability_zone_connectivity_list", flattenAvailabilityZoneConnectivityList(resp.Spec.Resources.AvailabilityZoneConnectivityList)); err != nil { + if err := d.Set("availability_zone_connectivity_list", + flattenAvailabilityZoneConnectivityList(resp.Spec.Resources.AvailabilityZoneConnectivityList)); err != nil { return err } - if err := d.Set("ordered_availability_zone_list", flattenOrderAvailibilityList(resp.Spec.Resources.OrderedAvailabilityZoneList)); err != nil { + if err := d.Set("ordered_availability_zone_list", + flattenOrderAvailibilityList(resp.Spec.Resources.OrderedAvailabilityZoneList)); err != nil { return err } if err := d.Set("state", resp.Status.State); err != nil { diff --git a/nutanix/resource_nutanix_protection_rule.go b/nutanix/resource_nutanix_protection_rule.go index 6f66fb7e6..0b01e8fbe 100755 --- a/nutanix/resource_nutanix_protection_rule.go +++ b/nutanix/resource_nutanix_protection_rule.go @@ -392,10 +392,12 @@ func resourceNutanixProtectionRuleRead(d *schema.ResourceData, meta interface{}) if err := d.Set("category_filter", flattenCategoriesFilter(resp.Spec.Resources.CategoryFilter)); err != nil { return err } - if err := d.Set("availability_zone_connectivity_list", flattenAvailabilityZoneConnectivityList(resp.Spec.Resources.AvailabilityZoneConnectivityList)); err != nil { + if err := d.Set("availability_zone_connectivity_list", + flattenAvailabilityZoneConnectivityList(resp.Spec.Resources.AvailabilityZoneConnectivityList)); err != nil { return err } - if err := d.Set("ordered_availability_zone_list", flattenOrderAvailibilityList(resp.Spec.Resources.OrderedAvailabilityZoneList)); err != nil { + if err := d.Set("ordered_availability_zone_list", + flattenOrderAvailibilityList(resp.Spec.Resources.OrderedAvailabilityZoneList)); err != nil { return err } if err := d.Set("state", resp.Status.State); err != nil {