<分区>
我的文件夹结构有点像这样。
├── executor
| ├── executor_test.go
| |── executor.go
| |--excutor_mock.go
| |--errors.go
| |--app.go
├── _includes
| ├── xyz.go
| └── abc.go
├──vendor
executor_test.go 包含 executor.go 的所有单元测试用例。
因此,当我运行 go test --cover ./...
时,它向我展示了覆盖率包,这很好,但我也想排除 errors.go、excutor_mock.go 和 app。进入 executor 文件夹,避免出现在 go test --cover ./...
中。那么有没有办法排除它们?