Skip to content

Commit

Permalink
Allows plugin invoked via GeneratePlugin to call RecordTypeUse wi…
Browse files Browse the repository at this point in the history
…thout panicking (gogo#571)
  • Loading branch information
fedenusy authored and jmarais committed May 19, 2019
1 parent aaa2bc4 commit 285f4c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions protoc-gen-gogo/generator/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) {
g.usedPackages = make(map[GoImportPath]bool)
g.packageNames = make(map[GoImportPath]GoPackageName)
g.usedPackageNames = make(map[GoPackageName]bool)
g.addedImports = make(map[GoImportPath]bool)
g.file = file

// Run the plugins before the imports so we know which imports are necessary.
Expand Down

0 comments on commit 285f4c7

Please sign in to comment.