Skip to content

Commit de0cade

Browse files
authoredJun 29, 2022
Merge pull request #474 from RSid/add-flag-documentation
Add documentation for --outpkg to readme
2 parents 2ca0b83 + 686b90c commit de0cade

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Installation
3535

3636
### Github Release
3737

38-
Visit the [releases page](https://github.com/vektra/mockery/releases) to download one of the pre-built binaries for your platform.
38+
Visit the [releases page](https://github.com/vektra/mockery/releases) to download one of the pre-built binaries for your platform.
3939

4040
### Docker
4141

@@ -352,6 +352,7 @@ The following descriptions provide additional elaboration on a few common parame
352352
| `--all` | It's common for a big package to have a lot of interfaces, so mockery provides `--all`. This option will tell mockery to scan all files under the directory named by `--dir` ("." by default) and generates mocks for any interfaces it finds. This option implies `--recursive=true`. |
353353
| `--recursive` | Use the `--recursive` option to search subdirectories for the interface(s). This option is only compatible with `--name`. The `--all` option implies `--recursive=true`. |
354354
| `--output` | mockery always generates files with the package `mocks` to keep things clean and simple. You can control which mocks directory is used by using `--output`, which defaults to `./mocks`. |
355+
|`--outpkg`| Use `--outpkg` to specify the package name of the generated mocks.|
355356
| `--inpackage` and `--keeptree` | For some complex repositories, there could be multiple interfaces with the same name but in different packages. In that case, `--inpackage` allows generating the mocked interfaces directly in the package that it mocks. In the case you don't want to generate the mocks into the package but want to keep a similar structure, use the option `--keeptree`. |
356357
| `--filename` | Use the `--filename` and `--structname` to override the default generated file and struct name. These options are only compatible with non-regular expressions in `--name`, where only one mock is generated. |
357358
| `--case` | mockery generates files using the casing of the original interface name. This can be modified by specifying `--case underscore` to format the generated file name using underscore casing. |
@@ -419,7 +420,7 @@ v1 is the original version of the software, and is no longer supported.
419420

420421
### v2
421422

422-
`mockery` is currently in v2, which iterates on v1 and includes mostly cosmetic and configuration improvements.
423+
`mockery` is currently in v2, which iterates on v1 and includes mostly cosmetic and configuration improvements.
423424

424425
### v3
425426

@@ -429,8 +430,8 @@ v1 is the original version of the software, and is no longer supported.
429430
* You specify the packages you want mocked, instead of relying on it auto-discovering your package. Auto-discovery in theory sounds great, but in practice it leads to a great amount of complexity for very little benefit.
430431
* Package- or interface-specific overrides can be given that change mock generation settings on a granular level. This will allow your mocks to be generated in a heterogenous manner, and will be made explicit by yaml configuration.
431432
- Proper error reporting. Errors across the board will be done in accordance with modern Golang practices
432-
- Variables in generated mocks will be given meaningful names.
433-
433+
- Variables in generated mocks will be given meaningful names.
434+
434435

435436

436437
Stargazers

0 commit comments

Comments
 (0)
Please sign in to comment.