Reset discards any buffered data, resets all state, and switches the writer to write to w.
(w io.Writer)
| 99 | |
| 100 | // Reset discards any buffered data, resets all state, and switches the writer to write to w. |
| 101 | func (e *Encoder) Reset(w io.Writer) { |
| 102 | e.ResetDict(w, nil) |
| 103 | } |
| 104 | |
| 105 | // ResetDict is like Reset, but also resets the dict. |
| 106 | func (e *Encoder) ResetDict(w io.Writer, dict map[string]int) { |