From 70551cb5a968e1bf37db9a3f7e2c6253986076af Mon Sep 17 00:00:00 2001 From: Evilolipop Date: Wed, 24 Jan 2024 17:27:06 +0800 Subject: [PATCH 1/3] Update README.md --- protobuf/protoc-gen-go-grain/README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/protobuf/protoc-gen-go-grain/README.md b/protobuf/protoc-gen-go-grain/README.md index c5c3ca2c..b085daa4 100644 --- a/protobuf/protoc-gen-go-grain/README.md +++ b/protobuf/protoc-gen-go-grain/README.md @@ -1,4 +1,16 @@ -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: -``` -protobuf/protoc-gen-go-grain/options/options.proto -``` \ No newline at end of file +- Go plugins for the protocol compiler: + +1. Install the protocol compiler plugins for Go using the following commands: + ``` + go install github.com/asynkron/protoactor-go/protobuf/protoc-gen-go-grain@latest + ``` + +2. Update your PATH so that the protoc compiler can find the plugins: + ``` + export PATH="$PATH:$(go env GOPATH)/bin" + ``` + +- 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: + ``` + protobuf/protoc-gen-go-grain/options/options.proto + ``` From af83bd8cb2f7f8326969150ca64117aa27d97ebf Mon Sep 17 00:00:00 2001 From: Evilolipop Date: Wed, 24 Jan 2024 17:33:35 +0800 Subject: [PATCH 2/3] Update README.md --- protobuf/protoc-gen-go-grain/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protobuf/protoc-gen-go-grain/README.md b/protobuf/protoc-gen-go-grain/README.md index b085daa4..d01ec979 100644 --- a/protobuf/protoc-gen-go-grain/README.md +++ b/protobuf/protoc-gen-go-grain/README.md @@ -9,6 +9,12 @@ ``` export PATH="$PATH:$(go env GOPATH)/bin" ``` +3. Compile `.proto` file + + ``` + protoc --go_out=. --go_opt=paths=source_relative \ + --go-grain_out=. --go-grain_opt=paths=source_relative hello.proto + ``` - 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: ``` From f7d9e5db9ca1a52152dd16f6c9bd802a163c0aff Mon Sep 17 00:00:00 2001 From: Evilolipop Date: Wed, 24 Jan 2024 17:35:50 +0800 Subject: [PATCH 3/3] Update README.md --- protobuf/protoc-gen-go-grain/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protobuf/protoc-gen-go-grain/README.md b/protobuf/protoc-gen-go-grain/README.md index d01ec979..54eb81c3 100644 --- a/protobuf/protoc-gen-go-grain/README.md +++ b/protobuf/protoc-gen-go-grain/README.md @@ -9,12 +9,12 @@ ``` export PATH="$PATH:$(go env GOPATH)/bin" ``` + 3. Compile `.proto` file - - ``` - protoc --go_out=. --go_opt=paths=source_relative \ + ``` + protoc --go_out=. --go_opt=paths=source_relative \ --go-grain_out=. --go-grain_opt=paths=source_relative hello.proto - ``` + ``` - 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: ```