@@ -77,7 +77,7 @@ func TestServerMethsTempl(t *testing.T) {
77
77
}
78
78
genBytes , err := ioutil .ReadAll (gen )
79
79
const expected = `
80
- func (s protoService ) ProtoMethod(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error){
80
+ func (s Service ) ProtoMethod(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error){
81
81
var resp pb.ResponseMessage
82
82
return &resp, nil
83
83
}
@@ -221,13 +221,13 @@ func TestIsValidFunc(t *testing.T) {
221
221
func init() {}`
222
222
223
223
const valid = `package p;
224
- func (s protoService ) ProtoMethod(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
224
+ func (s Service ) ProtoMethod(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
225
225
226
226
const invalidRecv = `package p;
227
- func (s fooService ) ProtoMethod(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
227
+ func (s Service ) ProtoMethod(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
228
228
229
229
const invalidFuncName = `package p;
230
- func (generalService ) FOOBAR(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
230
+ func (Service ) FOOBAR(context.Context, pb.RequestMessage) (pb.ResponseMessage, error) {}`
231
231
232
232
svcName := strings .ToLower (sd .Service .Name )
233
233
@@ -324,13 +324,13 @@ func TestPruneDecls(t *testing.T) {
324
324
}
325
325
326
326
// ProtoMethod implements Service.
327
- func (s protoService ) ProtoMethod(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error) {
327
+ func (s Service ) ProtoMethod(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error) {
328
328
var resp pb.ResponseMessage
329
329
return &resp, nil
330
330
}
331
331
332
332
// FOOBAR implements Service.
333
- func (s protoService ) FOOBAR(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error) {
333
+ func (s Service ) FOOBAR(ctx context.Context, in *pb.RequestMessage) (*pb.ResponseMessage, error) {
334
334
var resp pb.ResponseMessage
335
335
return &resp, nil
336
336
}
0 commit comments