updated docs
This commit is contained in:
parent
ebb408dc63
commit
5f095748f8
17
README.md
17
README.md
@ -6,10 +6,27 @@ By [Mat Ryer](https://twitter.com/matryer) and [David Hernandez](https://github.
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
|
In a command line:
|
||||||
|
|
||||||
```
|
```
|
||||||
moq InterfaceName -out mocks_test.go
|
moq InterfaceName -out mocks_test.go
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In code (for go generate):
|
||||||
|
|
||||||
|
```go
|
||||||
|
package my
|
||||||
|
|
||||||
|
//go:generate moq MyInterface -out myinterface_moq_test.go
|
||||||
|
|
||||||
|
type MyInterface interface {
|
||||||
|
Method1() error
|
||||||
|
Method2(i int)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run `go generate` for your package.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user