go_sysutils/envs/utils_windows.go
brent saner 43d1ddfeb8
v1.4.1
FIX:
* missing dep for windows env
2024-06-27 16:36:45 -04:00

18 lines
322 B
Go

//go:build windows
package envs
import (
"os"
"golang.org/x/sys/windows/registry"
)
// interpolateString takes string s and performs environment variable interpolation/substitution on it.
func interpolateString(s string) (subbed string, err error) {
subbed, err = registry.ExpandString(os.ExpandEnv(s))
return
}