WriteString implements io.StringWriter
(s string)
| 991 | |
| 992 | // WriteString implements io.StringWriter |
| 993 | func (p *printer) WriteString(s string) (n int, err error) { |
| 994 | if p.closed && p.err == nil { |
| 995 | p.err = errors.New("use of closed Encoder") |
| 996 | } |
| 997 | if p.err == nil { |
| 998 | n, p.err = p.w.WriteString(s) |
| 999 | } |
| 1000 | return n, p.err |
| 1001 | } |
| 1002 | |
| 1003 | // WriteByte implements io.ByteWriter |
| 1004 | func (p *printer) WriteByte(c byte) error { |
no outgoing calls
no test coverage detected