From eafb1d758c16f1956119eae4838cfc5b09a324ba Mon Sep 17 00:00:00 2001 From: Mat Ryer Date: Mon, 29 Aug 2016 13:33:28 +0100 Subject: [PATCH] added tips --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af44eba..0c83bc7 100644 --- a/README.md +++ b/README.md @@ -54,4 +54,10 @@ func CompleteSignUp(to string, sender EmailSender) { } ``` -The mocked structure implements the interface, where each method calls the associated function field. \ No newline at end of file +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