MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / String

Method String

base/log_keys.go:154–169  ·  view source on GitHub ↗

String returns the string representation of one or more log keys in a LogKeyMask

()

Source from the content-addressed store, hash-verified

152
153// String returns the string representation of one or more log keys in a LogKeyMask
154func (logKeyMask LogKeyMask) String() string {
155
156 // Try to pretty-print a set of log keys.
157 names := []string{}
158 for keyIndex, keyName := range logKeyNames {
159 if logKeyMask.Enabled(LogKey(keyIndex)) {
160 names = append(names, keyName)
161 }
162 }
163 if len(names) > 0 {
164 return strings.Join(names, ", ")
165 }
166
167 // Fall back to a binary representation.
168 return fmt.Sprintf("LogKeyMask(%b)", logKeyMask)
169}
170
171// String returns the string representation of one log key.
172func (logKey LogKey) String() string {

Callers

nothing calls this directly

Calls 2

EnabledMethod · 0.95
LogKeyTypeAlias · 0.85

Tested by

no test coverage detected