Skip to content

Commit

Permalink
feat(router-gen): add gin/binding import
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchen committed Jul 27, 2024
1 parent 8c0c134 commit 1fd8bf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/protoc-gen-go-gin/internal/generate/router/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const (
middlewarePkg = protogen.GoImportPath("github.com/zhufuyi/sponge/pkg/gin/middleware")
zapPkg = protogen.GoImportPath("go.uber.org/zap")
ginPkg = protogen.GoImportPath("github.com/gin-gonic/gin")
ginBindingPkg = protogen.GoImportPath("github.com/gin-gonic/gin/binding")
deprecationComment = "// Deprecated: Do not use."
)

Expand All @@ -36,7 +37,7 @@ func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.Generated
g.P()

g.P("// import packages: ", stringsPkg.Ident(" "), contextPkg.Ident(" "), errcodePkg.Ident(" "),
middlewarePkg.Ident(" "), zapPkg.Ident(" "), ginPkg.Ident(" "))
middlewarePkg.Ident(" "), zapPkg.Ident(" "), ginPkg.Ident(" "), ginBindingPkg.Ident(" "))
g.P()

for _, s := range file.Services {
Expand Down

0 comments on commit 1fd8bf5

Please sign in to comment.