Skip to content

Commit

Permalink
add documentation to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RSid committed Jun 6, 2022
1 parent 9dba1fd commit fa182fe
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Installation

### Github Release

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

### Docker

Expand Down Expand Up @@ -360,6 +360,7 @@ The following descriptions provide additional elaboration on a few common parame
| `--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`. |
| `--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`. |
| `--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`. |
|`--outpkg`| mockery always generates files with the package `mocks` to keep things clean and simple. You can control the package name by using `--outpkg`, which defaults to `mocks`.|
| `--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`. |
| `--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. |
| `--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. |
Expand Down Expand Up @@ -427,7 +428,7 @@ v1 is the original version of the software, and is no longer supported.

### v2

`mockery` is currently in v2, which iterates on v1 and includes mostly cosmetic and configuration improvements.
`mockery` is currently in v2, which iterates on v1 and includes mostly cosmetic and configuration improvements.

### v3

Expand All @@ -437,8 +438,8 @@ v1 is the original version of the software, and is no longer supported.
* 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.
* 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.
- Proper error reporting. Errors across the board will be done in accordance with modern Golang practices
- Variables in generated mocks will be given meaningful names.
- Variables in generated mocks will be given meaningful names.



Stargazers
Expand Down

0 comments on commit fa182fe

Please sign in to comment.