command
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Mar 21, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
go-grpc-imit-gen
gRPC imitation service generator for golang, based off of Moq.
This tool requires go code generated by protoc.
Installation
$ go install github.com/n6o/go-grpc-imit-gen@latest
Usage
Example is here.
Prepare 'repo' file
//go:generate go-grpc-imit-gen --repo=$GOFILE --dstDir=../imit/
package gen
import (
_ "google.golang.org/genproto/googleapis/pubsub/v1"
_ "google.golang.org/genproto/googleapis/spanner/v1"
)
Generate imitations
$ cd ./example
$ go mod tidy
$ go generate ./gen
Note
- I confirmed only Unary RPC that imitations works.
- Not confirmed other kinds.
Documentation
¶
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.