(err error, format string, args ...interface{})
| 87 | } |
| 88 | |
| 89 | func makeWrappedConstError(err error, format string, args ...interface{}) error { |
| 90 | separator := " " |
| 91 | if err.Error() == "" || errors.Is(err, &fmtNoop{}) { |
| 92 | separator = "" |
| 93 | } |
| 94 | return fmt.Errorf(strings.Join([]string{format, "%w"}, separator), append(args, err)...) |
| 95 | } |
| 96 | |
| 97 | // WithType is responsible for annotating an already existing error so that it |
| 98 | // also satisfies that of a ConstError. The resultant error returned should |
no test coverage detected
searching dependent graphs…