diff --git a/aws/canonical_policy_test.go b/aws/canonical_policy_test.go index 701e6c3ee..5064062ba 100644 --- a/aws/canonical_policy_test.go +++ b/aws/canonical_policy_test.go @@ -266,7 +266,7 @@ func TestConvertPolicy(t *testing.T) { func prettyPrint(src interface{}) { pretty, err := json.MarshalIndent(src, "", " ") if err != nil { - log.Fatalf(err.Error()) + log.Fatal(err.Error()) } fmt.Printf("\n %s\n", string(pretty)) diff --git a/aws/table_aws_securityhub_product.go b/aws/table_aws_securityhub_product.go index dcf95c25a..23e75c767 100644 --- a/aws/table_aws_securityhub_product.go +++ b/aws/table_aws_securityhub_product.go @@ -194,7 +194,7 @@ func getSecurityHubProduct(ctx context.Context, d *plugin.QueryData, _ *plugin.H return nil, err } - if op.Products != nil && len(op.Products) > 0 { + if op != nil && len(op.Products) > 0 { return op.Products[0], nil }