requested claritication and *possibly* answered here:
https://stackoverflow.com/questions/47246474/protobuf-how-to-combine-fieldoptions-with-default-values-in-messages

On 12 Nov 2017 7:12 a.m., <[email protected]> wrote:

> I have an message using FieldOptions but I also want to use default values
> as well, how do I combine two of those things ?
>
> extend google.protobuf.MessageOptions {
>     optional CommandInfo cmd = 5678;
> }
>
>
> message TestCmd {
>
>     optional bool BoolFlag = 1 [(info) = { name: "bool-flag" value: "false" 
> shorthand: "c" usage: "test"} ];
>     optional string StringFlag = 2 [ (info) = { name: "string-flag" value: "" 
> shorthand: "o" usage: "test"}];
>
> }
>
>
>
> I want that TestCmd.BoolFlag default value to be bool value  "false", 
> currently I'm using string value then convert it to bool, How do I
>
> specify the default value in a type-safe way ?
>
>
>
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to