...
1 package internal
2
3 import (
4 "errors"
5 "fmt"
6 )
7
8
9
10 var NoResponderFound = errors.New("no responder found")
11
12
13
14 type ErrorNoResponderFoundMistake struct {
15 Kind string
16 Orig string
17 Suggested string
18 }
19
20 var _ error = (*ErrorNoResponderFoundMistake)(nil)
21
22
23 func (e *ErrorNoResponderFoundMistake) Unwrap() error {
24 return NoResponderFound
25 }
26
27
28 func (e *ErrorNoResponderFoundMistake) Error() string {
29 return fmt.Sprintf("%[1]s for %[2]s %[3]q, but one matches %[2]s %[4]q",
30 NoResponderFound,
31 e.Kind,
32 e.Orig,
33 e.Suggested,
34 )
35 }
36
View as plain text