/protoc-gen-go-meta

a protobuf plugin for go

Primary LanguageGo

protoc-gen-go-meta

Description

Adds the Values() method to the enum class so that it can output custom string value.

How to use ?

  1. make sure your/go/bin/path is in your environment variables.

  1. install the plugin.

    go install github.com/dorlolo/protoc-gen-go-meta

  1. copy ./mea.proto into your project.

  1. then, You can refer to ./example/test.proto for development.

  1. 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