@@ -77,7 +77,7 @@ func TestServerMethsTempl(t *testing.T) {
7777 }
7878 genBytes , err := ioutil .ReadAll (gen )
7979 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){
8181 var resp pb.ResponseMessage
8282 return &resp, nil
8383 }
@@ -221,13 +221,13 @@ func TestIsValidFunc(t *testing.T) {
221221 func init() {}`
222222
223223 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) {}`
225225
226226 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) {}`
228228
229229 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) {}`
231231
232232 svcName := strings .ToLower (sd .Service .Name )
233233
@@ -324,13 +324,13 @@ func TestPruneDecls(t *testing.T) {
324324 }
325325
326326 // 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) {
328328 var resp pb.ResponseMessage
329329 return &resp, nil
330330 }
331331
332332 // 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) {
334334 var resp pb.ResponseMessage
335335 return &resp, nil
336336 }
0 commit comments