utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandDirectory

func ExpandDirectory(logger io.Logger, dir, wsPath, execPath string, env map[string]string) string

ExpandDirectory expands the directory field of an executable to an absolute path. The following transformations are applied: - empty dir -> execPath - // -> wsPath + dir path - . -> current working directory + dir path - relative path -> execPath + dir path - ${envVar} -> expanded to the value from env map.

func PathFromWd added in v0.1.0

func PathFromWd(path string) (string, error)

func ValidateOneOf

func ValidateOneOf(fieldName string, vals ...interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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