Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gosimple: Fix issues with structure.go #6403

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

YakDriver
Copy link
Member

Related to #6343 technical debt

Changes proposed in this pull request:

  • Fixes for all gosimple issues with structure.go

Output from acceptance testing:

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandIPPerms -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandIPPerms
--- PASS: TestExpandIPPerms (0.00s)
=== RUN   TestExpandIPPerms_NegOneProtocol
--- PASS: TestExpandIPPerms_NegOneProtocol (0.00s)
=== RUN   TestExpandIPPerms_nonVPC
--- PASS: TestExpandIPPerms_nonVPC (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.038s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandIPPerms_NegOneProtocol -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandIPPerms_NegOneProtocol
--- PASS: TestExpandIPPerms_NegOneProtocol (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandIPPerms_nonVPC -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandIPPerms_nonVPC
--- PASS: TestExpandIPPerms_nonVPC (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandListeners -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandListeners
--- PASS: TestExpandListeners (0.00s)
=== RUN   TestExpandListeners_invalid
--- PASS: TestExpandListeners_invalid (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.039s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandListeners_invalid -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandListeners_invalid
--- PASS: TestExpandListeners_invalid (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.046s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenHealthCheck -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenHealthCheck
--- PASS: TestFlattenHealthCheck (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.038s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandStringList -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandStringList
--- PASS: TestExpandStringList (0.00s)
=== RUN   TestExpandStringListEmptyItems
--- PASS: TestExpandStringListEmptyItems (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandStringListEmptyItems -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandStringListEmptyItems
--- PASS: TestExpandStringListEmptyItems (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandParameters
--- PASS: TestExpandParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandRedshiftParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandRedshiftParameters
--- PASS: TestExpandRedshiftParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandElasticacheParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandElasticacheParameters
--- PASS: TestExpandElasticacheParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandStepAdjustments -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandStepAdjustments
--- PASS: TestExpandStepAdjustments (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenParameters
--- PASS: TestFlattenParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenRedshiftParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenRedshiftParameters
--- PASS: TestFlattenRedshiftParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.030s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenElasticacheParameters -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenElasticacheParameters
--- PASS: TestFlattenElasticacheParameters (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandInstanceString -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandInstanceString
--- PASS: TestExpandInstanceString (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenNetworkInterfacesPrivateIPAddresses -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenNetworkInterfacesPrivateIPAddresses
--- PASS: TestFlattenNetworkInterfacesPrivateIPAddresses (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.034s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenGroupIdentifiers -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenGroupIdentifiers
--- PASS: TestFlattenGroupIdentifiers (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.035s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandPrivateIPAddresses -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandPrivateIPAddresses
--- PASS: TestExpandPrivateIPAddresses (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenAttachment -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenAttachment
--- PASS: TestFlattenAttachment (0.00s)
=== RUN   TestFlattenAttachmentWhenNoInstanceId
--- PASS: TestFlattenAttachmentWhenNoInstanceId (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenAttachmentWhenNoInstanceId -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenAttachmentWhenNoInstanceId
--- PASS: TestFlattenAttachmentWhenNoInstanceId (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenStepAdjustments -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenStepAdjustments
--- PASS: TestFlattenStepAdjustments (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenResourceRecords -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenResourceRecords
=== RUN   TestFlattenResourceRecords/TXT
=== RUN   TestFlattenResourceRecords/SPF
=== RUN   TestFlattenResourceRecords/CNAME
=== RUN   TestFlattenResourceRecords/MX
--- PASS: TestFlattenResourceRecords (0.00s)
    --- PASS: TestFlattenResourceRecords/TXT (0.00s)
    --- PASS: TestFlattenResourceRecords/SPF (0.00s)
    --- PASS: TestFlattenResourceRecords/CNAME (0.00s)
    --- PASS: TestFlattenResourceRecords/MX (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.033s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenAsgEnabledMetrics -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenAsgEnabledMetrics
--- PASS: TestFlattenAsgEnabledMetrics (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.031s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenKinesisShardLevelMetrics -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenKinesisShardLevelMetrics
--- PASS: TestFlattenKinesisShardLevelMetrics (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenSecurityGroups -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenSecurityGroups
--- PASS: TestFlattenSecurityGroups (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenApiGatewayThrottleSettings -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenApiGatewayThrottleSettings
--- PASS: TestFlattenApiGatewayThrottleSettings (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenApiGatewayStageKeys -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenApiGatewayStageKeys
--- PASS: TestFlattenApiGatewayStageKeys (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.039s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandPolicyAttributes -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandPolicyAttributes
--- PASS: TestExpandPolicyAttributes (0.00s)
=== RUN   TestExpandPolicyAttributes_invalid
--- PASS: TestExpandPolicyAttributes_invalid (0.00s)
=== RUN   TestExpandPolicyAttributes_empty
--- PASS: TestExpandPolicyAttributes_empty (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.035s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandPolicyAttributes_invalid -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandPolicyAttributes_invalid
--- PASS: TestExpandPolicyAttributes_invalid (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.035s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestExpandPolicyAttributes_empty -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestExpandPolicyAttributes_empty
--- PASS: TestExpandPolicyAttributes_empty (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestFlattenPolicyAttributes -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestFlattenPolicyAttributes
--- PASS: TestFlattenPolicyAttributes (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestCheckYamlString -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestCheckYamlString
--- PASS: TestCheckYamlString (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestNormalizeCloudFormationTemplate -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestNormalizeCloudFormationTemplate
--- PASS: TestNormalizeCloudFormationTemplate (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.036s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestCognitoUserPoolSchemaAttributeMatchesStandardAttribute -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestCognitoUserPoolSchemaAttributeMatchesStandardAttribute
--- PASS: TestCognitoUserPoolSchemaAttributeMatchesStandardAttribute (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	0.037s
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestCanonicalXML -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestCanonicalXML
=== RUN   TestCanonicalXML/Config_sample_from_MSDN
=== RUN   TestCanonicalXML/Config_sample_from_MSDN,_modified
=== RUN   TestCanonicalXML/Config_sample_from_MSDN,_flaw
=== RUN   TestCanonicalXML/A_note
--- PASS: TestCanonicalXML (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN,_modified (0.00s)
    --- PASS: TestCanonicalXML/Config_sample_from_MSDN,_flaw (0.00s)
    --- PASS: TestCanonicalXML/A_note (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	(cached)

@ghost ghost added the size/M Managed by automation to categorize the size of a PR. label Nov 8, 2018
@bflad bflad added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label Nov 8, 2018
@bflad bflad added this to the v1.44.0 milestone Nov 8, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @YakDriver! 🚀

Test failures unrelated

Tests failed: 3, passed: 119

@bflad bflad merged commit 36a3598 into hashicorp:master Nov 12, 2018
@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants