(cwd string)
| 462 | } |
| 463 | |
| 464 | func dirsFromRootToCWD(root, cwd string) []string { |
| 465 | root = filepath.Clean(root) |
| 466 | cwd = filepath.Clean(cwd) |
| 467 | if root == cwd { |
| 468 | return []string{root} |
| 469 | } |
| 470 | var reversed []string |
| 471 | current := cwd |
| 472 | for { |
| 473 | reversed = append(reversed, current) |
| 474 | if current == root { |
| 475 | break |
| 476 | } |
no test coverage detected