ToBytes outputs as byte slice.
()
| 49 | |
| 50 | // ToBytes outputs as byte slice. |
| 51 | func (d Decoder) ToBytes() []byte { |
| 52 | if len(d.dst) == 0 || d.Error != nil { |
| 53 | return []byte{} |
| 54 | } |
| 55 | return d.dst |
| 56 | } |
| 57 | |
| 58 | func (d Decoder) stream(fn func(io.Reader) io.Reader) ([]byte, error) { |
| 59 | var buf bytes.Buffer |
no outgoing calls