Skip to content

Commit

Permalink
Fix proto formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kujtim committed Jan 6, 2018
1 parent 219c308 commit a2437e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generator/add_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/kujtimiihoxha/kit/parser"
"github.com/kujtimiihoxha/kit/utils"
"github.com/spf13/viper"
"github.com/emicklei/proto-contrib/pkg/protofmt"
)

// GenerateTransport implement Gen, is used to generate a service transport
Expand Down Expand Up @@ -708,7 +709,7 @@ func (g *generateGRPCTransportProto) Generate() (err error) {
}
g.generateRequestResponse()
buf := new(bytes.Buffer)
formatter := proto.NewFormatter(buf, " ")
formatter := protofmt.NewFormatter(buf, " ")
formatter.Format(g.protoSrc)
err = g.fs.WriteFile(g.pbFilePath, buf.String(), true)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ import:
- imports
- package: github.com/emicklei/proto
- package: github.com/go-yaml/yaml
- package: github.com/emicklei/proto-contrib

0 comments on commit a2437e7

Please sign in to comment.