github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/protobuf/protoc-gen-go-grain/README.md (about)

     1  - Go plugins for the protocol compiler:
     2  
     3  1. Install the protocol compiler plugins for Go using the following commands:
     4      ```
     5      go install github.com/asynkron/protoactor-go/protobuf/protoc-gen-go-grain@latest
     6      ```
     7  
     8  2. Update your PATH so that the protoc compiler can find the plugins:
     9      ```
    10      export PATH="$PATH:$(go env GOPATH)/bin"
    11      ```
    12      
    13  3. Compile `.proto` file
    14     ```
    15     protoc --go_out=. --go_opt=paths=source_relative \
    16              --go-grain_out=. --go-grain_opt=paths=source_relative hello.proto
    17     ```
    18  
    19  - If you are using `protoc`, you need to ensure the required dependencies are available to the compiler at compile time. These can be found by manually cloning and copying the relevant files from here and providing them to protoc when running. The files you will need are:
    20      ```
    21      protobuf/protoc-gen-go-grain/options/options.proto
    22      ```