@@ -353,22 +353,22 @@ func (g *Generator) getServiceImpl(f *descriptor.File, s *descriptor.Service) (s
353
353
354
354
func (g * Generator ) getMethodImpl (s * descriptor.Service , m * descriptor.Method ) (string , error ) {
355
355
// restore orig GoPkg
356
- savedPkg := m . RequestType .File .GoPkg
356
+ savedPkg := s .File .GoPkg
357
357
defer func () {
358
- m . RequestType .File .GoPkg = savedPkg
358
+ s .File .GoPkg = savedPkg
359
359
}()
360
360
361
- return applyImplTemplate (g .getImplParam (m . RequestType .File , s , m , []string {"context" , "github.com/pkg/errors" }))
361
+ return applyImplTemplate (g .getImplParam (s .File , s , m , []string {"context" , "github.com/pkg/errors" }))
362
362
}
363
363
364
364
func (g * Generator ) getTestImpl (s * descriptor.Service , m * descriptor.Method ) (string , error ) {
365
365
// restore orig GoPkg
366
- savedPkg := m . RequestType .File .GoPkg
366
+ savedPkg := s .File .GoPkg
367
367
defer func () {
368
- m . RequestType .File .GoPkg = savedPkg
368
+ s .File .GoPkg = savedPkg
369
369
}()
370
370
371
- return applyTestTemplate (g .getImplParam (m . RequestType .File , s , m , []string {"context" , "testing" , "github.com/stretchr/testify/require" }))
371
+ return applyTestTemplate (g .getImplParam (s .File , s , m , []string {"context" , "testing" , "github.com/stretchr/testify/require" }))
372
372
}
373
373
374
374
func (g * Generator ) getImplParam (f * descriptor.File , s * descriptor.Service , m * descriptor.Method , deps []string ) implParam {
0 commit comments