diff --git a/cmd/tf-preview-gh/main.go b/cmd/tf-preview-gh/main.go index 2274415..f965691 100644 --- a/cmd/tf-preview-gh/main.go +++ b/cmd/tf-preview-gh/main.go @@ -19,7 +19,7 @@ import ( "time" "github.com/cenkalti/backoff" - "github.com/ffddorf/tf-preview-github/pkg/terraform" + "github.com/ffddorf/tf-preview-github/pkg/tfcontext" "github.com/go-git/go-git/v5" "github.com/google/go-github/v57/github" "github.com/google/uuid" @@ -33,7 +33,7 @@ func serveWorkspace(ctx context.Context) (string, error) { return "", err } - backend, err := terraform.FindBackend(cwd) + backend, err := tfcontext.FindBackend(cwd) if err != nil { return "", err } diff --git a/pkg/terraform/parse.go b/pkg/tfcontext/parse.go similarity index 99% rename from pkg/terraform/parse.go rename to pkg/tfcontext/parse.go index bf68c55..eea48fb 100644 --- a/pkg/terraform/parse.go +++ b/pkg/tfcontext/parse.go @@ -1,4 +1,4 @@ -package terraform +package tfcontext import ( "errors" diff --git a/pkg/terraform/parse_test.go b/pkg/tfcontext/parse_test.go similarity index 71% rename from pkg/terraform/parse_test.go rename to pkg/tfcontext/parse_test.go index 6dc1a83..e245b41 100644 --- a/pkg/terraform/parse_test.go +++ b/pkg/tfcontext/parse_test.go @@ -1,15 +1,15 @@ -package terraform_test +package tfcontext_test import ( "testing" - "github.com/ffddorf/tf-preview-github/pkg/terraform" + "github.com/ffddorf/tf-preview-github/pkg/tfcontext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestFindBackend(t *testing.T) { - be, err := terraform.FindBackend("./testdata") + be, err := tfcontext.FindBackend("./testdata") require.NoError(t, err) assert.Equal(t, "https://dummy-backend.example.com/state", be.Address) diff --git a/pkg/terraform/testdata/another.tf b/pkg/tfcontext/testdata/another.tf similarity index 100% rename from pkg/terraform/testdata/another.tf rename to pkg/tfcontext/testdata/another.tf diff --git a/pkg/terraform/testdata/backend.tf b/pkg/tfcontext/testdata/backend.tf similarity index 100% rename from pkg/terraform/testdata/backend.tf rename to pkg/tfcontext/testdata/backend.tf