Skip to content

tim-oster/protoc-gen-go-grpc-mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-grpc-mock

This is a protoc plugin that generates type-safe mock implementations for gRPC services using the testify mock library.

Usage

go install github.com/tim-oster/protoc-gen-go-grpc-mock@latest
protoc --go-grpc-mock_out=./ file.proto

Dependencies

Install Protobuf Compiler

Doc: https://grpc.io/docs/protoc-installation/

PB_VER="23.4"
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v${PB_VER}/protoc-${PB_VER}-linux-x86_64.zip
unzip -o protoc-${PB_VER}-linux-x86_64.zip -d $HOME/.local
rm protoc-${PB_VER}-linux-x86_64.zip

Install golang dependencies

Doc: https://grpc.io/docs/languages/go/quickstart/

go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published