Skip to content

Go support for Protocol Buffers

protoc-gen-go

Install

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

go.mod 추가

go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
go get google.golang.org/protobuf/cmd/protoc-gen-go

Troubleshooting

protoc-gen-go: program not found or is not executable

protoc-gen-go: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go_out: protoc-gen-go: Plugin failed with status code 1.

설치하자:

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

protoc-gen-go-grpc: program not found or is not executable

protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1.

설치하자:

go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

See also

Favorite site