()
| 95 | type PGLocks []PGLock |
| 96 | |
| 97 | func (l PGLocks) String() string { |
| 98 | // Try to group things together by relation name. |
| 99 | sort.Slice(l, func(i, j int) bool { |
| 100 | return safeString(l[i].RelationName) < safeString(l[j].RelationName) |
| 101 | }) |
| 102 | |
| 103 | var out strings.Builder |
| 104 | for i, lock := range l { |
| 105 | if i != 0 { |
| 106 | _, _ = out.WriteString("\n") |
| 107 | } |
| 108 | _, _ = out.WriteString(lock.String()) |
| 109 | } |
| 110 | return out.String() |
| 111 | } |
| 112 | |
| 113 | // Difference returns the difference between two sets of locks. |
| 114 | // This is helpful to determine what changed between the two sets. |
nothing calls this directly
no test coverage detected