19 lines
392 B
Go
19 lines
392 B
Go
//go:build windows
|
|
|
|
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
|
|
// All rights reserved.
|
|
|
|
// utils-unix.go
|
|
package util
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func ExpandPath(sourcePath string) (expandedPath string, err error) {
|
|
for expandedPath = os.ExpandEnv(sourcePath); expandedPath != sourcePath; expandedPath = os.ExpandEnv(sourcePath) {
|
|
sourcePath = expandedPath
|
|
}
|
|
return
|
|
}
|