kw510 / protoc-gen-go-mock

Ultra lightweight gRPC service mocks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Ultra lightweight gRPC service mocks.

License:MIT License


Languages

Language:Go 100.0%