Skip to content

Demonstration of how to use custom options in a golang compiler/protogen protoc plugin

Notifications You must be signed in to change notification settings

tgorton617/protoc-gen-go-option-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protoc-gen-go-option-example

Demonstration of how to use custom options in a golang compiler/protogen protoc plugin using the solution provided by @dsnet at golang/protobuf issue # 1260. Thanks @dsnet!

How to run

First you need protoc installed (and, of course, go.)

Then run:

make

The output (in ./generatedresult/out.txt) should look like:


Message Foo:
Value of option example_annotation_int32 is 1234
Value of option example_annotation_string is hello

Message Bar:
Value of option example_annotation_string is world

About

Demonstration of how to use custom options in a golang compiler/protogen protoc plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published