Skip to content

Commit

Permalink
fix generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Raezil committed Feb 26, 2025
1 parent d9bdf10 commit ae471d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/protoc-gen-rpc-impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func generateFile(gen *protogen.Plugin, file *protogen.File) {
// Write imports
g.P("import (")
g.P(` "context"`)
g.P(` "db"`)
g.P(` "go.uber.org/zap"`)
g.P(")")
g.P()

Expand All @@ -49,6 +51,8 @@ func generateServiceImplementation(g *protogen.GeneratedFile, service *protogen.
// Generate struct
g.P("type ", structName, " struct {")
g.P(" Unimplemented", service.GoName, "Server")
g.P(" PrismaClient *db.PrismaClient")
g.P(" Logger *zap.SugaredLogger")
g.P("}")
g.P()

Expand Down

0 comments on commit ae471d9

Please sign in to comment.