MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / appendGroup

Method appendGroup

logger/formatter_json.go:223–236  ·  view source on GitHub ↗

appendGroup appends a group of attributes to the buffer.

(name string, attrs []slog.Attr)

Source from the content-addressed store, hash-verified

221
222// appendGroup appends a group of attributes to the buffer.
223func (s *formatterJSON) appendGroup(name string, attrs []slog.Attr) {
224 if len(attrs) == 0 {
225 return
226 }
227
228 if len(name) > 0 {
229 // If the group has a name, open it and defer closing it.
230 // Unnamed groups should be treated as sets of regular attributes.
231 s.openGroup(name)
232 defer s.closeGroup()
233 }
234
235 s.appendAttributes(attrs)
236}
237
238// openGroup opens a new group in the buffer.
239func (s *formatterJSON) openGroup(name string) {

Callers 1

appendAttributeMethod · 0.95

Calls 3

openGroupMethod · 0.95
closeGroupMethod · 0.95
appendAttributesMethod · 0.95

Tested by

no test coverage detected