Documentation
¶
Overview ¶
Package pathtranslator provides path translation functions.
Index ¶
- func BinaryRelToAbs(relPath string) (string, error)
- func ListRelToExecRoot(execRoot, workingDir string, paths []string) []string
- func ListRelToWorkingDir(execRoot, workingDir string, paths []string) []string
- func RelToExecRoot(execRoot, workingDir, p string) string
- func RelToWorkingDir(execRoot, workingDir, p string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryRelToAbs ¶
BinaryRelToAbs converts a path that is relative to the current executable to an absolute path. If the executable is a symlink then the symlink is resolved before generating the path.
func ListRelToExecRoot ¶
ListRelToExecRoot converts a list of paths that are either relative to workingDir or absolute, to paths relative to execRoot. workingDir is relative to execRoot. A path will be ignored if path is not relative to execRoot. Output path is operating system defined file path.
func ListRelToWorkingDir ¶
ListRelToWorkingDir converts a list of paths that are either relative to the execroot or absolute, to paths relative to the workingDir. Output path is operating system defined file path.
func RelToExecRoot ¶
RelToExecRoot converts a path that is either relative to workingDir or absolute, to a path relative to execRoot. workingDir is relative to execRoot. It returns empty string if path is not relative to execRoot. Output path is operating system defined file path.
func RelToWorkingDir ¶
RelToWorkingDir converts a path that is either relative to the execroot or absolute, to a path relative to the workingDir.
Types ¶
This section is empty.