JoinDir joins dir and path if path is relative. If path is empty or absolute, it is returned unchanged.
(dir, path string)
| 94 | // JoinDir joins dir and path if path is relative. |
| 95 | // If path is empty or absolute, it is returned unchanged. |
| 96 | func JoinDir(dir, path string) string { |
| 97 | if path == "" || filepath.IsAbs(path) { |
| 98 | return path |
| 99 | } |
| 100 | return filepath.Join(dir, path) |
| 101 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…