package homedir import ( "os" ) func Expand(path string) string { if path[0:2] == "~/" { return os.Getenv("HOME") + path[1:] } else { return path } }