WriteByte implements io.ByteWriter
(c byte)
| 1002 | |
| 1003 | // WriteByte implements io.ByteWriter |
| 1004 | func (p *printer) WriteByte(c byte) error { |
| 1005 | if p.closed && p.err == nil { |
| 1006 | p.err = errors.New("use of closed Encoder") |
| 1007 | } |
| 1008 | if p.err == nil { |
| 1009 | p.err = p.w.WriteByte(c) |
| 1010 | } |
| 1011 | return p.err |
| 1012 | } |
| 1013 | |
| 1014 | // Close the Encoder, indicating that no more data will be written. It flushes |
| 1015 | // any buffered XML to the underlying writer and returns an error if the |
no outgoing calls
no test coverage detected