diff --git a/builder/null/artifact_export.go b/builder/null/artifact_export.go index ae6e46f27..f9ec6d825 100644 --- a/builder/null/artifact_export.go +++ b/builder/null/artifact_export.go @@ -4,8 +4,6 @@ package null import ( - "fmt" - registryimage "github.com/hashicorp/packer-plugin-sdk/packer/registry/image" ) @@ -26,7 +24,7 @@ func (*NullArtifact) Id() string { } func (a *NullArtifact) String() string { - return fmt.Sprintf("Did not export anything. This is the null builder") + return "Did not export anything. This is the null builder" } func (a *NullArtifact) State(name string) interface{} { diff --git a/command/build_parallel_test.go b/command/build_parallel_test.go index 959134fd5..09e994e9e 100644 --- a/command/build_parallel_test.go +++ b/command/build_parallel_test.go @@ -6,7 +6,6 @@ package command import ( "bytes" "context" - "fmt" "path/filepath" "sync" "testing" @@ -101,7 +100,7 @@ func TestBuildParallel_1(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=10"), + "-parallel-builds=10", filepath.Join(testFixture("parallel"), "1lock-5wg.json"), } @@ -130,7 +129,7 @@ func TestBuildParallel_2(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=3"), + "-parallel-builds=3", filepath.Join(testFixture("parallel"), "2lock-4wg.json"), } @@ -159,7 +158,7 @@ func TestBuildParallel_Timeout(t *testing.T) { } args := []string{ - fmt.Sprintf("-parallel-builds=3"), + "-parallel-builds=3", filepath.Join(testFixture("parallel"), "2lock-timeout.json"), } diff --git a/hcl2template/types.datasource.go b/hcl2template/types.datasource.go index 9ae5e995e..fd21585fd 100644 --- a/hcl2template/types.datasource.go +++ b/hcl2template/types.datasource.go @@ -45,7 +45,7 @@ func (ds *Datasources) Values() (map[string]cty.Value, hcl.Diagnostics) { for ref, datasource := range *ds { if datasource.value == (cty.Value{}) { diags = append(diags, &hcl.Diagnostic{ - Summary: fmt.Sprintf("empty value"), + Summary: "empty value", Subject: &datasource.block.DefRange, Severity: hcl.DiagError, }) @@ -73,7 +73,7 @@ func (cfg *PackerConfig) startDatasource(dataSourceStore packer.DatasourceStore, diags = append(diags, &hcl.Diagnostic{ Summary: "Unknown " + dataSourceLabel + " type " + ref.Type, Subject: block.LabelRanges[0].Ptr(), - Detail: fmt.Sprintf("packer does not currently know any data source."), + Detail: "packer does not currently know any data source.", Severity: hcl.DiagError, }) return nil, diags diff --git a/provisioner/breakpoint/provisioner.go b/provisioner/breakpoint/provisioner.go index fc833fb47..893dc2d79 100644 --- a/provisioner/breakpoint/provisioner.go +++ b/provisioner/breakpoint/provisioner.go @@ -67,8 +67,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packersdk.Ui, comm packe ui.Say("Pausing at breakpoint provisioner.") } - message := fmt.Sprintf( - "Press enter to continue.") + message := "Press enter to continue." var g errgroup.Group result := make(chan string, 1)