| Conditions | 4 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package postgres |
||
| 15 | func isSameArray(a, b []string) bool { |
||
| 16 | if len(a) != len(b) { |
||
| 17 | return false |
||
| 18 | } |
||
| 19 | |||
| 20 | sortedA := make([]string, len(a)) |
||
| 21 | copy(sortedA, a) |
||
| 22 | sort.Strings(sortedA) |
||
| 23 | |||
| 24 | sortedB := make([]string, len(b)) |
||
| 25 | copy(sortedB, b) |
||
| 26 | sort.Strings(sortedB) |
||
| 27 | |||
| 28 | for i := range sortedA { |
||
| 29 | if sortedA[i] != sortedB[i] { |
||
| 30 | return false |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 34 | return true |
||
| 35 | } |
||
| 36 |