String returns the string representation from the reader and ultimately the formatter.
()
| 96 | // String returns the string representation from the reader and ultimately the |
| 97 | // formatter. |
| 98 | func (entry *Entry) String() (string, error) { |
| 99 | serialized, err := entry.Bytes() |
| 100 | if err != nil { |
| 101 | return "", err |
| 102 | } |
| 103 | str := string(serialized) |
| 104 | return str, nil |
| 105 | } |
| 106 | |
| 107 | // WithError adds an error as single field (using the key defined in [ErrorKey]) |
| 108 | // to the Entry. |