MCPcopy Index your code
hub / github.com/coder/coder / String

Method String

coderd/database/pglocks.go:97–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95type PGLocks []PGLock
96
97func (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.

Callers

nothing calls this directly

Calls 3

safeStringFunction · 0.85
WriteStringMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected