From 22504200cc561a2adf40d8523852198ce3536b9d Mon Sep 17 00:00:00 2001 From: Akshat Mahajan Date: Mon, 1 Apr 2019 23:42:31 -0700 Subject: [PATCH] Fix typographical errors in the fixers --- fix/fixer_amazon_temporary_security_group_cidrs.go | 10 +++++----- ...fixer_amazon_temporary_security_group_cidrs_test.go | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fix/fixer_amazon_temporary_security_group_cidrs.go b/fix/fixer_amazon_temporary_security_group_cidrs.go index 10048a617..c48a28011 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs.go @@ -19,7 +19,7 @@ func (FixerAmazonTemporarySecurityCIDRs) Fix(input map[string]interface{}) (map[ return nil, err } - // Go through each builder and replace the temporary_security_group_cidr if we can + // Go through each builder and replace the temporary_security_group_source_cidr if we can for _, builder := range tpl.Builders { builderTypeRaw, ok := builder["type"] if !ok { @@ -35,13 +35,13 @@ func (FixerAmazonTemporarySecurityCIDRs) Fix(input map[string]interface{}) (map[ continue } - temporarySecurityGroupCIDR, ok := builder["temporary_security_group_cidr"].(string) + temporarySecurityGroupCIDR, ok := builder["temporary_security_group_source_cidr"].(string) if !ok { continue } - delete(builder, "temporary_security_group_cidr") - builder["temporary_security_group_cidrs"] = []string{temporarySecurityGroupCIDR} + delete(builder, "temporary_security_group_source_cidr") + builder["temporary_security_group_source_cidrs"] = []string{temporarySecurityGroupCIDR} } input["builders"] = tpl.Builders @@ -49,5 +49,5 @@ func (FixerAmazonTemporarySecurityCIDRs) Fix(input map[string]interface{}) (map[ } func (FixerAmazonTemporarySecurityCIDRs) Synopsis() string { - return `Replaces "temporary_security_group_cidr" (string) with "temporary_security_group_cidrs" (list of strings)` + return `Replaces "temporary_security_group_source_cidr" (string) with "temporary_security_group_source_cidrs" (list of strings)` } diff --git a/fix/fixer_amazon_temporary_security_group_cidrs_test.go b/fix/fixer_amazon_temporary_security_group_cidrs_test.go index 1c0144ac4..1a17e3f18 100644 --- a/fix/fixer_amazon_temporary_security_group_cidrs_test.go +++ b/fix/fixer_amazon_temporary_security_group_cidrs_test.go @@ -16,13 +16,13 @@ func TestFixerAmazonTemporarySecurityCIDRs(t *testing.T) { }{ { Input: map[string]interface{}{ - "type": "amazon-ebs", - "temporary_security_group_cidr": "0.0.0.0/0", + "type": "amazon-ebs", + "temporary_security_group_source_cidr": "0.0.0.0/0", }, Expected: map[string]interface{}{ - "type": "amazon-ebs", - "temporary_security_group_cidrs": []string{"0.0.0.0/0"}, + "type": "amazon-ebs", + "temporary_security_group_source_cidrs": []string{"0.0.0.0/0"}, }, }, }