Adds the Values() method to the enum class so that it can output custom string value.
- make sure your/go/bin/path is in your environment variables.
-
install the plugin.
go install github.com/dorlolo/protoc-gen-go-meta
- copy ./mea.proto into your project.
- then, You can refer to ./example/test.proto for development.
-
finally, using protoc to produce the file, just add a '--go-meta_out' parameter to the original command. for example:
protoc --proto_path=. --go-meta_out=.\example --go_out=.\example .\example\test.proto