endpoint: remove unused errors
Thanks, @groob and @Ayiga!
Peter Bourgon
5 years ago
0 | 0 | package endpoint |
1 | 1 | |
2 | 2 | import ( |
3 | "errors" | |
4 | ||
5 | 3 | "golang.org/x/net/context" |
6 | 4 | ) |
7 | 5 | |
16 | 14 | // Middleware is a chainable behavior modifier for endpoints. |
17 | 15 | type Middleware func(Endpoint) Endpoint |
18 | 16 | |
19 | // ErrBadCast indicates an unexpected concrete request or response struct was | |
20 | // received from an endpoint. | |
21 | var ErrBadCast = errors.New("bad cast") | |
22 | ||
23 | // ErrContextCanceled indicates the request context was canceled. | |
24 | var ErrContextCanceled = errors.New("context canceled") | |
25 | ||
26 | 17 | // Chain is a helper function for composing middlewares. Requests will |
27 | 18 | // traverse them in the order they're declared. That is, the first middleware |
28 | 19 | // is treated as the outermost middleware. |