Skip to content

Commit

Permalink
fix comments and style
Browse files Browse the repository at this point in the history
  • Loading branch information
hongalex committed Nov 5, 2024
1 parent 9b4928a commit 1b72599
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions internal/gengapic/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func (g *generator) autoPopulatedFields(_ string, m *descriptorpb.MethodDescript
func (g *generator) getServiceNameOverride(p pbinfo.ProtoType) string {
// Get the fully qualified name (e.x. google.pubsub.v1.Publisher)
fqn := g.fqn(p)
// TODO(hongalex): replace the manual map with service config
// ls := g.serviceConfig.GetPublishing().GetLibrarySettings()[0]
// renamedServices := ls.GetGoSettings().GetRenamedServices()

Expand Down
4 changes: 1 addition & 3 deletions internal/gengapic/gengapic.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ func gen(genReq *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse
if err := g.gen(s); err != nil {
return nil, err
}

g.commit(outFile+"_client.go", g.opts.pkgName)

g.reset()
Expand Down Expand Up @@ -202,9 +201,8 @@ func (g *generator) collectServices(genReq *pluginpb.CodeGeneratorRequest) (genS

// gen generates client for the given service.
func (g *generator) gen(serv *descriptorpb.ServiceDescriptorProto) error {
// If using service renaming, use that directly for the next part.
// If using service name overrides, use that directly for the rest of generation.
override := g.getServiceNameOverride(serv)

servName := pbinfo.ReduceServNameWithOverride(serv.GetName(), g.opts.pkgName, override)

g.clientHook(servName)
Expand Down

0 comments on commit 1b72599

Please sign in to comment.