Skip to content

Commit d5fa85a

Browse files
authored
docs: add Windows environment example for generating Kitex mock client (#1217)
1 parent b324caa commit d5fa85a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/zh/docs/kitex/Best Practice/Integration Testing/mock_client.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,17 @@ Kitex mock 方式如下:
2626

2727
找到 kitex_gen 目录下的 client,里面有对应的 client 接口,用 go mock 生成 mock client
2828

29+
mac环境下:
30+
2931
```bash
3032
mockgen -source=kitex_gen/xxxx/xxxservice/client.go -destination=xxx/client_mock.go -package=xxx
3133
```
3234

35+
windows环境下:
36+
```bash
37+
mockgen -source kitex_gen/xxxx/xxxservice/client.go -destination xxx/client_mock.go -package xxx
38+
```
39+
3340
该命令会生成 client_mock.go,在测试中使用即可:
3441

3542
```go

0 commit comments

Comments
 (0)