Skip to content

Commit

Permalink
Remove the need to install mockgen in the script
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Dec 27, 2024
1 parent 68d0d03 commit d62ead3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
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 @@ -7,7 +7,4 @@ if ! [[ "$0" =~ scripts/mock.gen.sh ]]; then
exit 255
fi

# https://github.com/uber-go/mock
go install -v go.uber.org/mock/[email protected]

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

0 comments on commit d62ead3

Please sign in to comment.