(path string)
| 137 | } |
| 138 | |
| 139 | func expandHome(path string) string { |
| 140 | if path == "~" { |
| 141 | if home, err := os.UserHomeDir(); err == nil { |
| 142 | return home |
| 143 | } |
| 144 | return path |
| 145 | } |
| 146 | if strings.HasPrefix(path, "~/") { |
| 147 | if home, err := os.UserHomeDir(); err == nil { |
| 148 | return filepath.Join(home, path[2:]) |
| 149 | } |
| 150 | } |
| 151 | return path |
| 152 | } |
no outgoing calls
no test coverage detected