Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
simaotwx committed Apr 11, 2022
1 parent 62d0c1a commit a0e49a7
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 32 deletions.
1 change: 0 additions & 1 deletion examples/example.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

variable "test_var1" {
type = string
}
Expand Down
2 changes: 1 addition & 1 deletion examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data "packer_files" "files2" {
}

resource "packer_image" "image1" {
file = data.packer_files.files1.file
file = data.packer_files.files1.file
variables = {
test_var1 = "test 1"
test_var2 = "test 2"
Expand Down
1 change: 0 additions & 1 deletion examples/subdir/example2.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

variable "test_var3" {
type = string
}
24 changes: 0 additions & 24 deletions funcs/filesha256.go

This file was deleted.

2 changes: 1 addition & 1 deletion provider/data_source_packer_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type dataSourceBuildType struct {
BuildUUID types.String `tfsdk:"uuid"`
}

func (d dataSourceBuild) updateAutoComputed(resourceState *dataSourceBuildType) error {
func (d dataSourceBuild) updateAutoComputed(_ *dataSourceBuildType) error {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions provider/data_source_packer_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (r dataSourceVersionType) GetSchema(_ context.Context) (tfsdk.Schema, diag.
}, nil
}

func (r dataSourceVersionType) NewDataSource(ctx context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
func (r dataSourceVersionType) NewDataSource(_ context.Context, p tfsdk.Provider) (tfsdk.DataSource, diag.Diagnostics) {
return dataSourceVersion{
p: *(p.(*provider)),
}, nil
Expand All @@ -39,7 +39,7 @@ type dataSourceVersion struct {
p provider
}

func (r dataSourceVersion) Read(ctx context.Context, req tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
func (r dataSourceVersion) Read(ctx context.Context, _ tfsdk.ReadDataSourceRequest, resp *tfsdk.ReadDataSourceResponse) {
resourceState := dataSourceVersionType{}
exe, _ := os.Executable()
output, err := cmds.RunCommandWithEnvReturnOutput(
Expand Down
2 changes: 1 addition & 1 deletion provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (p *provider) GetSchema(_ context.Context) (tfsdk.Schema, diag.Diagnostics)
}, nil
}

func (p *provider) Configure(ctx context.Context, req tfsdk.ConfigureProviderRequest, resp *tfsdk.ConfigureProviderResponse) {
func (p *provider) Configure(_ context.Context, _ tfsdk.ConfigureProviderRequest, _ *tfsdk.ConfigureProviderResponse) {
exe, _ := os.Executable()
err := cmds.RunCommandWithEnv(exe, map[string]string{packer_interop.TPPRunPacker: "true"}, "version")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion provider/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

type NonEmptyStringValidator struct{}

func (n NonEmptyStringValidator) Description(ctx context.Context) string {
func (n NonEmptyStringValidator) Description(_ context.Context) string {
return "Checks if the given string is not empty."
}

Expand Down

0 comments on commit a0e49a7

Please sign in to comment.