From de8964e8d1f3a21decad6ef6602c1c2395b1c641 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Jul 2018 16:49:16 -0400 Subject: [PATCH] resource/aws_storagegateway_cache: Rename decodeStorageGatewayID to decodeStorageGatewayCacheID --- aws/resource_aws_storagegateway_cache.go | 4 ++-- aws/resource_aws_storagegateway_cache_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_storagegateway_cache.go b/aws/resource_aws_storagegateway_cache.go index 24b720431dc..6ba99904b11 100644 --- a/aws/resource_aws_storagegateway_cache.go +++ b/aws/resource_aws_storagegateway_cache.go @@ -61,7 +61,7 @@ func resourceAwsStorageGatewayCacheCreate(d *schema.ResourceData, meta interface func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).storagegatewayconn - gatewayARN, diskID, err := decodeStorageGatewayID(d.Id()) + gatewayARN, diskID, err := decodeStorageGatewayCacheID(d.Id()) if err != nil { return err } @@ -107,7 +107,7 @@ func resourceAwsStorageGatewayCacheRead(d *schema.ResourceData, meta interface{} return nil } -func decodeStorageGatewayID(id string) (string, string, error) { +func decodeStorageGatewayCacheID(id string) (string, string, error) { // id = arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 idFormatErr := fmt.Errorf("expected ID in form of GatewayARN:DiskId, received: %s", id) gatewayARNAndDisk, err := arn.Parse(id) diff --git a/aws/resource_aws_storagegateway_cache_test.go b/aws/resource_aws_storagegateway_cache_test.go index 9a9cc637d96..7d99095e5e1 100644 --- a/aws/resource_aws_storagegateway_cache_test.go +++ b/aws/resource_aws_storagegateway_cache_test.go @@ -52,7 +52,7 @@ func TestDecodeStorageGatewayCacheID(t *testing.T) { } for _, tc := range testCases { - gatewayARN, diskID, err := decodeStorageGatewayID(tc.Input) + gatewayARN, diskID, err := decodeStorageGatewayCacheID(tc.Input) if tc.ErrCount == 0 && err != nil { t.Fatalf("expected %q not to trigger an error, received: %s", tc.Input, err) } @@ -104,7 +104,7 @@ func testAccCheckAWSStorageGatewayCacheExists(resourceName string) resource.Test conn := testAccProvider.Meta().(*AWSClient).storagegatewayconn - gatewayARN, diskID, err := decodeStorageGatewayID(rs.Primary.ID) + gatewayARN, diskID, err := decodeStorageGatewayCacheID(rs.Primary.ID) if err != nil { return err }