Skip to content

Commit

Permalink
add a dummy type (#13)
Browse files Browse the repository at this point in the history
* add Reference

* adjust README

Co-authored-by: mihails.kuzmins <[email protected]>
  • Loading branch information
MihailsKuzmins and MihailsKuzminsDG authored Oct 5, 2021
1 parent c4434fe commit 8d224be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,14 @@ Generate mocks for *service1*, *service2* and *service3* with interfaces.
```sh
mockgen service1:Service1 service2
```
Generate a mock for *service1* with its interface; Generate a mock for *service2* without an interface.
Generate a mock for *service1* with its interface; Generate a mock for *service2* without an interface.

## Keep the package reference
Command `go mod tidy` will remove the reference of Mockgen by default. In order to keep the reference create a dummy file somewhere and import a dummy type.
```go
package pkg

import "github.com/MyNihongo/mockgen"

var _ mockgen.Reference
```
4 changes: 4 additions & 0 deletions src.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package mockgen

type Reference interface {
}

0 comments on commit 8d224be

Please sign in to comment.