Skip to content

Commit ac5f9ae

Browse files
authored
Add mock generation instructions to FAQ
Added instructions for generating mocks for external packages using mockery.
1 parent 3ed8ae7 commit ac5f9ae

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/faq.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ title: FAQ
55
Frequently Asked Questions
66
===========================
77

8+
How do I generate mocks for external packages?
9+
----------------------------
10+
11+
To generate mocks for external packages, you first need to `go get` the package in your project. Then, simply include the external package in your mockery config. For example:
12+
13+
```yaml
14+
packages:
15+
go.temporal.io/sdk:
16+
config:
17+
all: true
18+
recursive: true
19+
dir: mocks/{{.SrcPackagePath}}
20+
filename: mocks.go
21+
```
22+
823
error: `interface not found in source`
924
--------------------------------------
1025

0 commit comments

Comments
 (0)