From a2437e7d07d801b5ab525e2fbc33c68b696c430b Mon Sep 17 00:00:00 2001 From: Kujtim Date: Sat, 6 Jan 2018 17:24:22 +0100 Subject: [PATCH] Fix proto formatter. --- generator/add_transport.go | 3 ++- glide.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/generator/add_transport.go b/generator/add_transport.go index e59ef5e..1309419 100644 --- a/generator/add_transport.go +++ b/generator/add_transport.go @@ -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 @@ -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 { diff --git a/glide.yaml b/glide.yaml index eb75f43..7bb01a3 100644 --- a/glide.yaml +++ b/glide.yaml @@ -22,3 +22,4 @@ import: - imports - package: github.com/emicklei/proto - package: github.com/go-yaml/yaml +- package: github.com/emicklei/proto-contrib