File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
tools/protoc-gen-go-triple Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -140,10 +140,13 @@ const ImportTpl = `
140140
141141import (
142142 "context"
143- "dubbo.apache.org/dubbo-go/v3"
144143 {{if .IsStream}}"net/http"{{end}}
145144)
146145
146+ import (
147+ "dubbo.apache.org/dubbo-go/v3"
148+ )
149+
147150`
148151
149152const TotalTpl = `// This is a compile-time assertion to ensure that this generated file and the Triple package
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ func genTriple(plugin *protogen.Plugin) error {
8383 continue
8484 }
8585
86- // 跳过无服务的proto文件
86+ // Skip proto files without services.
8787 if len (file .Proto .GetService ()) == 0 {
8888 continue
8989 }
@@ -93,7 +93,7 @@ func genTriple(plugin *protogen.Plugin) error {
9393 // Extract the package name from the go_package option
9494 // Use the import path as parsed by protogen to avoid edge cases.
9595 g := plugin .NewGeneratedFile (filename , file .GoImportPath )
96- // 导入dubbo基础库
96+ // import Dubbo's libraries
9797 g .QualifiedGoIdent (protogen .GoImportPath ("dubbo.apache.org/dubbo-go/v3/client" ).Ident ("client" ))
9898 g .QualifiedGoIdent (protogen .GoImportPath ("dubbo.apache.org/dubbo-go/v3/common" ).Ident ("common" ))
9999 g .QualifiedGoIdent (protogen .GoImportPath ("dubbo.apache.org/dubbo-go/v3/common/constant" ).Ident ("constant" ))
You can’t perform that action at this time.
0 commit comments