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

Method appendGroup

logger/formatter_pretty.go:172–186  ·  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

170
171// appendGroup appends a group of attributes to the buffer.
172func (s *formatterPretty) appendGroup(name string, attrs []slog.Attr) {
173 // Ignore empty groups
174 if len(attrs) == 0 {
175 return
176 }
177
178 if len(name) > 0 {
179 // If the group has a name, open it and defer closing it.
180 // Unnamed groups should be treated as sets of regular attributes.
181 s.openGroup(name)
182 defer s.closeGroup()
183 }
184
185 s.appendAttributes(attrs)
186}
187
188// openGroup opens a new group of attributes.
189func (s *formatterPretty) 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