Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
blampe authored and t0yv0 committed Dec 4, 2023
1 parent 8aa34d1 commit c47194b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pf/internal/defaults/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/resource"

"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/schema"
)

Expand Down Expand Up @@ -62,7 +62,7 @@ func TestApplyDefaultInfoValues(t *testing.T) {
}

testFrom := func(res *tfbridge.PulumiResource) (interface{}, error) {
n := string(res.URN.Name()) + "-"
n := res.URN.Name() + "-"
a := []rune("12345")
unique, err := resource.NewUniqueName(res.Seed, n, 3, 12, a)
return resource.NewStringProperty(unique), err
Expand All @@ -74,7 +74,7 @@ func TestApplyDefaultInfoValues(t *testing.T) {
) func(context.Context, tfbridge.ComputeDefaultOptions) (interface{}, error) {
return func(_ context.Context, opts tfbridge.ComputeDefaultOptions) (interface{}, error) {
require.Equal(t, expectPriorValue, opts.PriorValue)
n := string(opts.URN.Name()) + "-"
n := opts.URN.Name() + "-"
a := []rune("12345")
unique, err := resource.NewUniqueName(opts.Seed, n, 3, 12, a)
return resource.NewStringProperty(unique), err
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func ComputeAutoNameDefault(
}

// Take the URN name part, transform it if required, and then append some unique characters if requested.
vs := string(defaultOptions.URN.Name())
vs := defaultOptions.URN.Name()
if options.Transform != nil {
vs = options.Transform(vs)
}
Expand Down

0 comments on commit c47194b

Please sign in to comment.