Documentation
¶
Overview ¶
Package resolve provides pure path-resolution and config-parsing helpers extracted from devconfig so they can be unit-tested without side effects.
Index ¶
- func AppDir(appDir string) (string, error)
- func BlueprintPath(appDir string, flagValue string) (string, error)
- func DeployTargetToProvider(deployTarget string) string
- func DirWithTestFallback(appDir string, base string, mode string) string
- func ModulePath(appDir string, flagValue string, candidates []string) string
- type NotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppDir ¶
AppDir resolves the application directory from a flag value. Empty or "." returns the current working directory; otherwise the path is resolved to an absolute path.
func BlueprintPath ¶
BlueprintPath resolves the blueprint file path. If flagValue is non-empty, it is resolved relative to appDir. Otherwise the function auto-detects from known filenames.
func DeployTargetToProvider ¶
DeployTargetToProvider maps a deploy target name to the base cloud provider identifier used by the runtime.
func DirWithTestFallback ¶
DirWithTestFallback resolves a directory that may have a test-specific override. For "test" mode, it prefers <base>/test/ and falls back to <base>/local/. For other modes, it uses <base>/local/. Returns empty string if neither directory exists.
func ModulePath ¶
ModulePath resolves the module entry point path. If flagValue is non-empty it is returned directly. Otherwise candidates are tried in order; the first that exists on disk wins. If none exist, the first candidate is returned as the default.
Types ¶
type NotFoundError ¶
NotFoundError is returned when an expected file or directory is not found.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string