Documentation
¶
Index ¶
- func ExpandDirectory(logger io.Logger, dir, wsPath, execPath string, env map[string]string) string
- func ExpandPath(logger io.Logger, path, fallbackDir string, env map[string]string) string
- func IsZeroValue(v interface{}) bool
- func PathFromWd(path string) (string, error)
- func ValidateOneOf(fieldName string, vals ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandDirectory ¶
ExpandDirectory expands the directory field of an executable to an absolute path. The following transformations are applied: - empty dir -> execPath (directory portion) - // -> wsPath + dir path (workspace-specific) - all other paths -> delegated to ExpandPath If the input contains a filename, returns just the directory portion.
func ExpandPath ¶
ExpandPath expands a general path to an absolute path with security validation. The following transformations are applied: - empty path -> fallbackPath (directory portion) - ~/path -> home directory + path - ./path or . -> current working directory + path - /path -> absolute path - relative path -> fallbackPath (directory portion) + path - ${envVar} -> expanded to the value from env map.
func IsZeroValue ¶
func IsZeroValue(v interface{}) bool
func PathFromWd ¶
func ValidateOneOf ¶
Types ¶
This section is empty.