6765ff04eb
This helper function can be used on service methods to read options, which extend method options by a string. e.g. It is possible to read "Some string" for a custom `my_method_option.bar` message option extension. See: https://developers.google.com/protocol-buffers/docs/proto#customoptions on how to define a custom extension and referencing is by a fieldID. ``` service MyService { rpc MyMethod(RequestType) returns(ResponseType) { option (my_method_option.bar) = "Some string"; } } ``` If `my_method_option.bar` was defined for `fieldID: 50000` one can reference it using protoc-gen-template like: ``` {{- stringMethodOptionsExtension 50000 .method }} ``` |
||
---|---|---|
.. | ||
helpers.go |