go_sysutils/envs/utils_windows.go
2024-04-11 12:46:13 -04:00

16 lines
315 B
Go

//go:build windows
package envs
import (
"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
}