package
1.12.0-alpha20250213
Repository: https://github.com/hashicorp/terraform.git
Documentation: pkg.go.dev
# Functions
ExpandSubdirGlobs handles a subdir string that might contain glob syntax, turning it into a concrete subdirectory path by referring to the actual files on disk in the given directory which we assume contains the content of whichever package this is a subdirectory glob for.
NormalizePackageAddress turns a user-supplied source address into a normalized address which always includes a prefix naming a protocol to fetch with and may also include a transformed/normalized version of the protocol-specific source address included afterward.
ParseModuleSource parses a module source address as given in the "source" argument inside a "module" block in the configuration.
ParseModuleSourceRegistry is a variant of ParseModuleSource which only accepts module registry addresses, and will reject any other address type.
SplitPackageSubdir detects whether the given address string has a subdirectory portion, and if so returns a non-empty subDir string along with the trimmed package address.
# Structs
MaybeRelativePathErr is the error type returned by NormalizePackageAddress if the source address looks like it might be intended to be a relative filesystem path but without the required "./" or "../" prefix.