fix String protobuf generator

This commit is contained in:
deads2k
2016-07-20 11:10:28 -04:00
parent 2c4a9f2e8d
commit 2256c6e619
4 changed files with 9 additions and 11 deletions

View File

@@ -132,7 +132,7 @@ func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) {
switch t.Name.Name {
case "Unmarshal":
ast.Walk(&optionalItemsVisitor{}, t.Body)
case "MarshalTo", "Size":
case "MarshalTo", "Size", "String":
ast.Walk(&optionalItemsVisitor{}, t.Body)
fallthrough
case "Marshal":