@@ -43,23 +43,14 @@ type Conn struct {
43
43
type Handler func (context.Context , * Conn , * Request )
44
44
45
45
// Canceler is an option you can pass to NewConn which is invoked for
46
- // cancelled outgoing requests.
46
+ // canceled outgoing requests.
47
47
// The request will have the ID filled in, which can be used to propagate the
48
48
// cancel to the other process if needed.
49
49
// It is okay to use the connection to send notifications, but the context will
50
- // be in the cancelled state, so you must do it with the background context
50
+ // be in the canceled state, so you must do it with the background context
51
51
// instead.
52
52
type Canceler func (context.Context , * Conn , * Request )
53
53
54
- // NewErrorf builds a Error struct for the suppied message and code.
55
- // If args is not empty, message and args will be passed to Sprintf.
56
- func NewErrorf (code ErrorCode , format string , args ... interface {}) * Error {
57
- return & Error {
58
- Code : code ,
59
- Message : fmt .Sprintf (format , args ... ),
60
- }
61
- }
62
-
63
54
// NewConn creates a new connection object that reads and writes messages from
64
55
// the supplied stream and dispatches incoming messages to the supplied handler.
65
56
func NewConn (ctx context.Context , s Stream , options ... interface {}) * Conn {
0 commit comments