Optional Fields
To support this, the Protobuf project supports some Well-Known types called “wrapper types”. For example, the wrapper type for a , is called google.protobuf.BoolValue
and is :
Let’s see this in action, modifying our ent schema to include an optional field:
The generated service implementation also utilize this field. Observe in entpb_user_service.go
: