NewSyncEncoder returns a SyncEncoder that writes to w.
(w io.Writer)
| 53 | |
| 54 | // NewSyncEncoder returns a SyncEncoder that writes to w. |
| 55 | func NewSyncEncoder(w io.Writer) *SyncEncoder { |
| 56 | return &SyncEncoder{enc: json.NewEncoder(w)} |
| 57 | } |
| 58 | |
| 59 | // Encode writes a single log entry for the given stream. |
| 60 | func (s *SyncEncoder) Encode(stream, line string) error { |
no outgoing calls
no test coverage detected
searching dependent graphs…