From 8e9c23f5079d9ad78f500c2b360f83155d36fc50 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 | 6 +++--- nutanix/data_source_protection_rule.go | 6 ++++-- nutanix/resource_nutanix_protection_rule.go | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4e9629ff7..37687e5b6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,9 +20,9 @@ linters-settings: # Default is 120. '\t' is counted as 1 character. # set our project to 200, as things like v3_structs with inline comments end up being a touch long # also, for anyone using vscode, use the following configs: - # "rewrap.wrappingColumn": 200 ... requires the rewrap plugin - # "editor.rulers": [200] - line-length: 200 + # "rewrap.wrappingColumn": 140 ... requires the rewrap plugin + # "editor.rulers": [140] + line-length: 150 linters: enable-all: true 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 {