github.com/greenboxal/deis@v1.12.1/deisctl/utils/utils.go (about) 1 // Package utils contains commonly useful functions from Deisctl 2 package utils 3 4 import ( 5 "os" 6 "strings" 7 ) 8 9 // ResolvePath returns the path with a tilde (~) and $HOME replaced by the actual home directory 10 func ResolvePath(path string) string { 11 path = strings.Replace(path, "~", os.Getenv("HOME"), -1) 12 // Using $HOME seems to work just fine with `deisctl config`, but not `deisctl refresh-units` 13 path = strings.Replace(path, "$HOME", os.Getenv("HOME"), -1) 14 return path 15 }