added tips
This commit is contained in:
parent
2f4206a8e6
commit
eafb1d758c
@ -54,4 +54,10 @@ func CompleteSignUp(to string, sender EmailSender) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The mocked structure implements the interface, where each method calls the associated function field.
|
The mocked structure implements the interface, where each method calls the associated function field.
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
* Keep mocked logic inside the test that is using it
|
||||||
|
* Only mock the fields you need - it will panic if a nil function gets called
|
||||||
|
* Use `go:generate` to invoke the `moq` command
|
||||||
|
Loading…
Reference in New Issue
Block a user