WriteTextAppenderString will write the bytes from the given encoding.TextAppender as a string.
(b encoding.TextAppender)
| 937 | // WriteTextAppenderString will write the bytes from the given |
| 938 | // encoding.TextAppender as a string. |
| 939 | func (mw *Writer) WriteTextAppenderString(b encoding.TextAppender) (err error) { |
| 940 | defer func() { |
| 941 | if r := recover(); r != nil { |
| 942 | err = fmt.Errorf("msgp: panic during AppendText: %v", r) |
| 943 | } |
| 944 | }() |
| 945 | dst := bytesPool.Get().([]byte) |
| 946 | defer bytesPool.Put(dst) //nolint:staticcheck |
| 947 | dst, err = b.AppendText(dst[:0]) |
| 948 | if err != nil { |
| 949 | return err |
| 950 | } |
| 951 | return mw.WriteStringFromBytes(dst) |
| 952 | } |
nothing calls this directly
no test coverage detected