Allow aliasing interface name (#110)

Implementation based on #57.
This commit is contained in:
Suhas Karanth
2019-11-05 13:13:49 +05:30
committed by GitHub
parent 382bd174c0
commit 1206bf1e2a
5 changed files with 69 additions and 19 deletions

View File

@@ -29,6 +29,8 @@ moq [flags] destination interface [interface2 [interface3 [...]]]
output file (default stdout)
-pkg string
package name (default will infer)
Specifying an alias for the mock is also supported with the format 'interface:alias'
Ex: moq -pkg different . MyInterface:MyMock
```
In a command line:
@@ -63,7 +65,7 @@ In this example, Moq generated the `EmailSenderMock` type:
```go
func TestCompleteSignup(t *testing.T) {
var sentTo string
var sentTo string
mockedEmailSender = &EmailSenderMock{
SendFunc: func(to, subject, body string) error {