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

Method appendGroup

logger/formatter_structured.go:119–132  ·  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

117
118// appendGroup appends a group of attributes to the buffer.
119func (s *formatterStructured) appendGroup(name string, attrs []slog.Attr) {
120 if len(attrs) == 0 {
121 return
122 }
123
124 if len(name) > 0 {
125 // If the group has a name, open it and defer closing it.
126 // Unnamed groups should be treated as sets of regular attributes.
127 s.openGroup(name)
128 defer s.closeGroup(name)
129 }
130
131 s.appendAttributes(attrs)
132}
133
134// openGroup opens a new group of attributes.
135func (s *formatterStructured) 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