go-grpc-imit-gen

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 1 Imported by: 0

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

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL