| Conditions | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package util |
||
| 47 | func PathsEqual(p1, p2 string) bool { |
||
|
1 ignored issue
–
show
|
|||
| 48 | p1 = strings.TrimRight(p1, "/\\") |
||
| 49 | p2 = strings.TrimRight(p2, "/\\") |
||
| 50 | |||
| 51 | if p1 == p2 { |
||
| 52 | return true |
||
| 53 | } |
||
| 54 | |||
| 55 | if filepath.FromSlash(p1) == filepath.FromSlash(p2) { |
||
| 56 | return true |
||
| 57 | } |
||
| 58 | |||
| 59 | if filepath.ToSlash(p1) == filepath.ToSlash(p2) { |
||
| 60 | return true |
||
| 61 | } |
||
| 62 | |||
| 63 | return false |
||
| 64 | } |
||
| 65 |