appendKey appends an attribute key to the buffer.
(key string)
| 132 | |
| 133 | // appendKey appends an attribute key to the buffer. |
| 134 | func (s *formatterJSON) appendKey(key string) { |
| 135 | s.buf.append(s.sep...) |
| 136 | s.sep = jsonAttributeSep |
| 137 | |
| 138 | s.appendString(key) |
| 139 | s.buf.append(':') |
| 140 | } |
| 141 | |
| 142 | // appendValue appends a value to the buffer, applying quoting rules as necessary. |
| 143 | func (s *formatterJSON) appendValue(val slog.Value) { |
no test coverage detected