Skip to content

Commit

Permalink
Fix import for self
Browse files Browse the repository at this point in the history
Signed-off-by: Edward McFarlane <[email protected]>
  • Loading branch information
emcfarlane committed Dec 19, 2024
1 parent 7b04e44 commit a2b22c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/protoc-gen-connect-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ func generate(plugin *protogen.Plugin, file *protogen.File, samePackage bool) {
file.GeneratedFilenamePrefix+generatedFilenameExtension,
goImportPath,
)
generatedFile.Import(file.GoImportPath)
if !samePackage {
generatedFile.Import(file.GoImportPath)
}
generatePreamble(generatedFile, file)
generateServiceNameConstants(generatedFile, file.Services)
generateServiceNameVariables(generatedFile, file)
Expand Down

0 comments on commit a2b22c5

Please sign in to comment.