protogen: Fix oneof getter scalar default value

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-26 14:16:10 +03:00
parent 6bd17672f2
commit ad24052ad9

View file

@ -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))
}
}