Skip to content

Commit

Permalink
Use go_package option as base path.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Du committed Jun 20, 2017
1 parent d64f531 commit 8bfe653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protoc-gen-grpc-gateway/gengateway/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8bfe653

Please sign in to comment.