From 545c35b05b7c3dadd786df8288a035133b27ef10 Mon Sep 17 00:00:00 2001 From: Guinevere Saenger Date: Mon, 4 Dec 2023 14:15:52 -0800 Subject: [PATCH] linting and such --- examples/examples_yaml_test.go | 2 +- provider/provider.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/examples_yaml_test.go b/examples/examples_yaml_test.go index b986b7d1..581400cd 100644 --- a/examples/examples_yaml_test.go +++ b/examples/examples_yaml_test.go @@ -96,7 +96,7 @@ func TestBuildOnPreviewYAML(t *testing.T) { }) } -func TestUnknownsBuildOnPreviewFailsYAML(t *testing.T) { +func TestUnknownsBuildOnPreviewWarnsYAML(t *testing.T) { cwd, err := os.Getwd() if !assert.NoError(t, err) { t.FailNow() diff --git a/provider/provider.go b/provider/provider.go index 606214a7..08cc9ce4 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -738,10 +738,10 @@ func marshalBuildOnPreview(inputs resource.PropertyMap) bool { func ensureMinimumBuildInputs(inputs resource.PropertyMap) bool { if !inputs["build"].IsObject() { return false - } else { - if inputs["build"].ObjectValue()["dockerfile"].ContainsUnknowns() || inputs["build"].ObjectValue()["context"].ContainsUnknowns() { - return false - } + } + if inputs["build"].ObjectValue()["dockerfile"].ContainsUnknowns() || + inputs["build"].ObjectValue()["context"].ContainsUnknowns() { + return false } if inputs["imageName"].ContainsUnknowns() { return false