Refactor Rewrite functions

This commit is contained in:
Wojciech Tyczynski
2016-03-09 12:14:00 +01:00
parent aca37830b1
commit dcf292174e
2 changed files with 42 additions and 59 deletions

View File

@@ -229,7 +229,7 @@ func Run(g *Generator) {
// alter the generated protobuf file to remove the generated types (but leave the serializers) and rewrite the
// package statement to match the desired package name
if err := RewriteGeneratedGogoProtobufFile(outputPath, p.GoPackageName(), p.ExtractGeneratedType, buf.Bytes()); err != nil {
if err := RewriteGeneratedGogoProtobufFile(outputPath, p.ExtractGeneratedType, buf.Bytes()); err != nil {
log.Fatalf("Unable to rewrite generated %s: %v", outputPath, err)
}