Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEnvVarNotSet = fmt.Errorf("env var not set")
Functions ¶
This section is empty.
Types ¶
type GardenPath ¶
type GardenPath []string
GardenPath is a smart path representation. It is a sequence of directory names starting from root directory.
The first element represents the root directory:
- linux or else: empty string
- windows: volume name (e.g. C:)
func New ¶
func New(path string) (GardenPath, error)
New constructor handles:
- Clean dot and double dot
- tilde replacement,
- absolute path conversion,
- trailing slash removal.
It returns nil if the path is empty.
func NewCheckEnv ¶
func NewCheckEnv(path string) (gp GardenPath, notFound []string, err error)
Returns a list of env vars that were not found.
func (GardenPath) Copy ¶
func (p GardenPath) Copy() GardenPath
func (GardenPath) IsEqual ¶
func (p GardenPath) IsEqual(other GardenPath) bool
func (GardenPath) Parent ¶
func (p GardenPath) Parent() GardenPath
Return the parent path. Technically it returns [0:len(p)-1].
Click to show internal directories.
Click to hide internal directories.