diff --git a/protoc-gen-grpc-gateway/gengateway/generator.go b/protoc-gen-grpc-gateway/gengateway/generator.go index d08609bc729..9520d2cddcb 100644 --- a/protoc-gen-grpc-gateway/gengateway/generator.go +++ b/protoc-gen-grpc-gateway/gengateway/generator.go @@ -77,7 +77,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*plugin.CodeGenerato glog.Errorf("%v: %s", err, code) return nil, err } - name := file.GetName() + name := file.GoPkg.Path ext := filepath.Ext(name) base := strings.TrimSuffix(name, ext) output := fmt.Sprintf("%s.pb.gw.go", base)