Skip to content

Commit

Permalink
Remove the need to install mockgen in mock.gen.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Dec 27, 2024
1 parent d6746f8 commit a37996e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package interfaces

//go:generate mockgen -package=$GOPACKAGE -copyright_file=../../../../../license_header -destination=mock_listener.go . StateCallbackListener
//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -package=$GOPACKAGE -copyright_file=../../../../../license_header -destination=mock_listener.go . StateCallbackListener
2 changes: 1 addition & 1 deletion precompile/contract/mocks_generate_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package contract

//go:generate mockgen -package=$GOPACKAGE -copyright_file=../../license_header -destination=mocks.go . BlockContext,AccessibleState,StateDB
//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -package=$GOPACKAGE -copyright_file=../../license_header -destination=mocks.go . BlockContext,AccessibleState,StateDB
2 changes: 1 addition & 1 deletion precompile/precompileconfig/mocks_generate_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package precompileconfig

//go:generate mockgen -package=$GOPACKAGE -copyright_file=../../license_header -destination=mocks.go . Predicater,Config,ChainConfig,Accepter
//go:generate go run go.uber.org/mock/mockgen@v0.4.0 -package=$GOPACKAGE -copyright_file=../../license_header -destination=mocks.go . Predicater,Config,ChainConfig,Accepter
3 changes: 0 additions & 3 deletions scripts/mock.gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@

set -euo pipefail

# https://github.com/uber-go/mock
go install -v go.uber.org/mock/mockgen@v0.4.0

go generate -run "mockgen.+license_header" ./...

0 comments on commit a37996e

Please sign in to comment.