protogen: Fix oneof getter scalar default value
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
6bd17672f2
commit
ad24052ad9
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ func emitOneofGettersSetters(g *protogen.GeneratedFile, msg *protogen.Message, f
|
|||
g.P("}")
|
||||
|
||||
ft := fieldType(g, ff)
|
||||
emitGetterSetter(g, ff.GoIdent.GoName, ff.GoName, ft.String(), "nil")
|
||||
emitGetterSetter(g, ff.GoIdent.GoName, ff.GoName, ft.String(), fieldDefaultValue(ff))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue