Skip to content

Commit 4cd2843

Browse files
authored
Merge pull request #229 from Nordix/generate
Replace make mocks by make generate
2 parents 58c13e5 + 3152638 commit 4cd2843

File tree

19 files changed

+21
-20
lines changed

19 files changed

+21
-20
lines changed

Makefile

+3-11
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ cover:
105105
.PHONY: check
106106
check: lint test
107107

108-
.PHONY: mocks
109-
mocks:
110-
mockgen -source=./pkg/ambassador/tap/types/stream.go -destination=./pkg/ambassador/tap/types/mocks/stream.go -package=mocks
111-
mockgen -source=./pkg/ambassador/tap/types/conduit.go -destination=./pkg/ambassador/tap/types/mocks/conduit.go -package=mocks
112-
mockgen -source=./pkg/ambassador/tap/types/trench.go -destination=./pkg/ambassador/tap/types/mocks/trench.go -package=mocks
113-
mockgen -source=./pkg/ambassador/tap/types/registry.go -destination=./pkg/ambassador/tap/types/mocks/registry.go -package=mocks
114-
mockgen -source=./pkg/ambassador/tap/trench/factory.go -destination=./pkg/ambassador/tap/trench/mocks/factory.go -package=mocks
115-
mockgen -source=./pkg/ambassador/tap/conduit/configuration.go -destination=./pkg/ambassador/tap/conduit/mocks/configuration.go -package=mocks
116-
mockgen -source=./pkg/ambassador/tap/conduit/types.go -destination=./pkg/ambassador/tap/conduit/mocks/types.go -package=mocks
117-
mockgen -source=./pkg/ambassador/tap/stream/types.go -destination=./pkg/ambassador/tap/stream/mocks/types.go -package=mocks
118-
mockgen -source=./pkg/nsm/client.go -destination=./pkg/nsm/mocks/client.go -package=mocks
108+
.PHONY: generate
109+
generate:
110+
go generate ./...

pkg/ambassador/tap/conduit/configuration.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=configuration.go -destination=mocks/configuration.go -package=mocks
1718
package conduit
1819

1920
import (

pkg/ambassador/tap/conduit/mocks/configuration.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/conduit/mocks/types.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/conduit/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=types.go -destination=mocks/types.go -package=mocks
1718
package conduit
1819

1920
import (

pkg/ambassador/tap/stream/mocks/types.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/stream/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=types.go -destination=mocks/types.go -package=mocks
1718
package stream
1819

1920
import (

pkg/ambassador/tap/trench/factory.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=factory.go -destination=mocks/factory.go -package=mocks
1718
package trench
1819

1920
import (

pkg/ambassador/tap/trench/mocks/factory.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/types/conduit.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=conduit.go -destination=mocks/conduit.go -package=mocks
1718
package types
1819

1920
import (

pkg/ambassador/tap/types/mocks/conduit.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/types/mocks/registry.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/types/mocks/stream.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/types/mocks/trench.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/ambassador/tap/types/registry.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=registry.go -destination=mocks/registry.go -package=mocks
1718
package types
1819

1920
import (

pkg/ambassador/tap/types/stream.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=stream.go -destination=mocks/stream.go -package=mocks
1718
package types
1819

1920
import (

pkg/ambassador/tap/types/trench.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=trench.go -destination=mocks/trench.go -package=mocks
1718
package types
1819

1920
import (

pkg/nsm/client.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
//go:generate mockgen -source=client.go -destination=mocks/client.go -package=mocks
1718
package nsm
1819

1920
import (

pkg/nsm/mocks/client.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)