Move pkg/tfconf to internal/terraform

Originally pkg/tfconf was set to be public to be used by plugin
developers, but these structs have to be defined by plugin-sdk and as
such it's moved to internal/terraform to be only used by terraform-docs
core project.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
This commit is contained in:
Khosrow Moossavi
2021-01-25 19:13:58 -05:00
parent 6f2d07e258
commit e3a19ea9dd
69 changed files with 709 additions and 774 deletions

View File

@@ -14,7 +14,7 @@ import (
"github.com/terraform-docs/terraform-docs/cmd"
"github.com/terraform-docs/terraform-docs/internal/format"
"github.com/terraform-docs/terraform-docs/internal/module"
"github.com/terraform-docs/terraform-docs/internal/terraform"
"github.com/terraform-docs/terraform-docs/pkg/print"
)
@@ -148,11 +148,11 @@ func printExample(buf *bytes.Buffer, name string) error {
settings := print.NewSettings()
settings.ShowColor = false
options := &module.Options{
options := &terraform.Options{
Path: "./examples",
ShowHeader: true,
HeaderFromFile: "main.tf",
SortBy: &module.SortBy{
SortBy: &terraform.SortBy{
Name: settings.SortByName,
Required: settings.SortByRequired,
},
@@ -163,7 +163,7 @@ func printExample(buf *bytes.Buffer, name string) error {
if err != nil {
return err
}
tfmodule, err := module.LoadWithOptions(options)
tfmodule, err := terraform.LoadWithOptions(options)
if err != nil {
log.Fatal(err)
}