Skip to content

Commit

Permalink
fix: use relative path for grpc generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
loveyana committed Dec 11, 2023
1 parent 82f9bfa commit 9413084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/hz/protobuf/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (plugin *Plugin) GenerateFiles(pluginPb *protogen.Plugin) error {
func (plugin *Plugin) GenerateFile(gen *protogen.Plugin, f *protogen.File) error {
impt := string(f.GoImportPath)
if strings.HasPrefix(impt, plugin.Package) {
impt = impt[len(plugin.Package):]
impt = impt[len(plugin.Package)+1:]
}
f.GeneratedFilenamePrefix = filepath.Join(util.ImportToPath(impt, ""), util.BaseName(f.Proto.GetName(), ".proto"))
f.Generate = true
Expand Down

0 comments on commit 9413084

Please sign in to comment.