Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit e95d779

Browse files
authored
Merge pull request #2 from mariusstaicu/custom-mock-names
Custom mock names
2 parents ffbb772 + c08186c commit e95d779

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ It supports the following flags:
7474

7575
* `-build_flags`: (reflect mode only) Flags passed verbatim to `go build`.
7676

77-
* `-mockNames`: A list of custom names for generated mocks. This is specified
77+
* `-mock_names`: A list of custom names for generated mocks. This is specified
7878
as a comma-separated list of elements of the form
7979
`Repository=MockSensorRepository,Endpoint=MockSensorEndpoint`, where
8080
`Repository` is the interface name and `MockSensorRepository` is the desired

mockgen/mockgen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const (
4343
var (
4444
source = flag.String("source", "", "(source mode) Input Go source file; enables source mode.")
4545
destination = flag.String("destination", "", "Output file; defaults to stdout.")
46-
mockNames = flag.String("mockNames", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.")
46+
mockNames = flag.String("mock_names", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.")
4747
packageOut = flag.String("package", "", "Package of the generated code; defaults to the package of the input with a 'mock_' prefix.")
4848
selfPackage = flag.String("self_package", "", "If set, the package this mock will be part of.")
4949
writePkgComment = flag.Bool("write_package_comment", true, "Writes package documentation comment (godoc) if true.")

0 commit comments

Comments
 (0)