Skip to content

kw510/protoc-gen-go-mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protoc-gen-go-mock

Go Reference Go Report Card

This tool generates Go language bindings of services in protobuf definition files for mocking gRPC.

Installation

go install github.com/kw510/protoc-gen-go-mock@latest

Also required:

Usage

With protoc

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
protoc --go_out=.examples \
       --go-grpc_out=.examples \
       --go-mock_out=.examples \
       .examples/petstore.proto

Building locally

mkdir .build
export PATH=$PATH:$(pwd)/.build
go build -o ./.build