Skip to content

Commit

Permalink
Slightly improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinClabaut committed Jul 13, 2022
1 parent 4d1f925 commit 464ea71
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Table of Contents
* [Docker](#docker)
* [Homebrew](#homebrew)
* [go install](#go-install)
- [Requirement](#requirement)
- [Examples](#examples)
+ [Simplest case](#simplest-case)
+ [Next level case](#next-level-case)
Expand Down Expand Up @@ -41,8 +42,14 @@ Visit the [releases page](https://github.com/vektra/mockery/releases) to downloa

Use the [Docker image](https://hub.docker.com/r/vektra/mockery)

Get mockery verion:

docker pull vektra/mockery

Generate all the mocks for your project:

docker run -v "$PWD":/src -w /src vektra/mockery --all

### Homebrew

Install through [brew](https://brew.sh/)
Expand All @@ -58,6 +65,11 @@ Alternatively, you can use the go install method to compile the project using yo

go install github.com/vektra/mockery/v2@latest

Requirement
-----------

For mockery to correctly generate mocks, the command has to be run on a module (i.e. your project has to have a go.mod file)

Examples
--------

Expand Down Expand Up @@ -359,6 +371,7 @@ The following descriptions provide additional elaboration on a few common parame
| `--print` | Use `mockery --print` to have the resulting code printed out instead of written to disk. |
| `--exported` | Use `mockery --exported` to generate public mocks for private interfaces. |
| `--with-expecter` | Use `mockery --with-expecter` to generate `EXPECT()` methods for your mocks. This is the preferred way to setup your mocks. |
| `--log-level` | Use `--log-level` to generate useful logs. Possible values are `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `panic` |

Mocking interfaces in `main`
----------------------------
Expand Down

0 comments on commit 464ea71

Please sign in to comment.