github.com/kevinklinger/open_terraform@v1.3.6/noninternal/earlyconfig/module.go (about)

     1  package earlyconfig
     2  
     3  import (
     4  	"github.com/hashicorp/terraform-config-inspect/tfconfig"
     5  	"github.com/kevinklinger/open_terraform/noninternal/tfdiags"
     6  )
     7  
     8  // LoadModule loads some top-level metadata for the module in the given
     9  // directory.
    10  func LoadModule(dir string) (*tfconfig.Module, tfdiags.Diagnostics) {
    11  	mod, diags := tfconfig.LoadModule(dir)
    12  	return mod, wrapDiagnostics(diags)
    13  }