(f fmt.State, verb rune)
| 201 | } |
| 202 | |
| 203 | func (e *safeError) Format(f fmt.State, verb rune) { |
| 204 | switch verb { |
| 205 | case 'v', 's': |
| 206 | f.Write([]byte(e.Error())) //nolint:errcheck |
| 207 | if f.Flag('+') { |
| 208 | for _, fr := range e.StackTrace() { |
| 209 | fmt.Fprintf(f, "\n%s\n\t%s:%d", fr.Function, fr.File, fr.Line) |
| 210 | } |
| 211 | return |
| 212 | } |
| 213 | case 'q': |
| 214 | fmt.Fprintf(f, "%q", e.Error()) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | // redactedError is an error containing a redacted message. It is usually the |
| 219 | // result of calling Error(safeError). |
no test coverage detected