resolve

package
v0.0.0-...-3776344 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppDir

func AppDir(appDir string) (string, error)

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

func BlueprintPath(appDir string, flagValue string) (string, error)

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

func DeployTargetToProvider(deployTarget string) string

DeployTargetToProvider maps a deploy target name to the base cloud provider identifier used by the runtime.

func DirWithTestFallback

func DirWithTestFallback(appDir string, base string, mode string) string

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

func ModulePath(appDir string, flagValue string, candidates []string) string

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

type NotFoundError struct {
	Path string
	Kind string
}

NotFoundError is returned when an expected file or directory is not found.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL