Skip to content

Commit a86e3f6

Browse files
committed
fix lll issue
1 parent 5f205c9 commit a86e3f6

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

internal/conn/middleware.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
var _ grpc.ClientConnInterface = (*middleware)(nil)
1010

1111
type (
12-
invoker func(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
13-
streamer func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
12+
invoker func(context.Context, string, interface{}, interface{}, ...grpc.CallOption) error
13+
streamer func(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)
1414
)
1515

1616
type middleware struct {
@@ -39,7 +39,9 @@ func WithContextModifier(
3939
ctx = modifyCtx(ctx)
4040
return cc.Invoke(ctx, method, args, reply, opts...)
4141
},
42-
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
42+
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (
43+
grpc.ClientStream, error,
44+
) {
4345
ctx = modifyCtx(ctx)
4446
return cc.NewStream(ctx, desc, method, opts...)
4547
},
@@ -52,7 +54,9 @@ func WithAppendOptions(cc grpc.ClientConnInterface, appendOpts ...grpc.CallOptio
5254
opts = append(opts, appendOpts...)
5355
return cc.Invoke(ctx, method, args, reply, opts...)
5456
},
55-
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
57+
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (
58+
grpc.ClientStream, error,
59+
) {
5660
opts = append(opts, appendOpts...)
5761
return cc.NewStream(ctx, desc, method, opts...)
5862
},
@@ -68,7 +72,9 @@ func WithBeforeFunc(
6872
before()
6973
return cc.Invoke(ctx, method, args, reply, opts...)
7074
},
71-
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
75+
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (
76+
grpc.ClientStream, error,
77+
) {
7278
before()
7379
return cc.NewStream(ctx, desc, method, opts...)
7480
},
@@ -84,7 +90,9 @@ func WithAfterFunc(
8490
defer after()
8591
return cc.Invoke(ctx, method, args, reply, opts...)
8692
},
87-
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
93+
newStream: func(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (
94+
grpc.ClientStream, error,
95+
) {
8896
defer after()
8997
return cc.NewStream(ctx, desc, method, opts...)
9098
},

0 commit comments

Comments
 (0)