From 877fbe9decef8217faf088036d2ac114c24d7352 Mon Sep 17 00:00:00 2001 From: dvladco Date: Thu, 4 Apr 2019 09:58:05 +0300 Subject: [PATCH] fix: change svc name --- protoc-gen-gogqlgen/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protoc-gen-gogqlgen/main.go b/protoc-gen-gogqlgen/main.go index 9fe4422..0fd3563 100644 --- a/protoc-gen-gogqlgen/main.go +++ b/protoc-gen-gogqlgen/main.go @@ -122,9 +122,9 @@ func (p *plugin) Generate(file *generator.FileDescriptor) { in, inref = "", ", &"+typeIn+"{}" } if p.IsEmpty(p.Types()[rpc.GetOutputType()]) { - p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*bool, error) { _, err := s.svc.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ")\n return nil, err }") + p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*bool, error) { _, err := s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ")\n return nil, err }") } else { - p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*", typeOut, ", error) { return s.svc.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ") }") + p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", p.contextPkg.Use(), ".Context", in, ") (*", typeOut, ", error) { return s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ") }") } } }