build: add imports for go generate tools (#24682)

This adds a tools.go file to import all command packages used for
go:generate. Doing so makes it possible to execute go-based code
generators using 'go run', locking in the tool version using go.mod.

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
ucwong
2022-04-13 02:24:02 +08:00
committed by GitHub
parent eb69f490ed
commit d4d288e3f1
24 changed files with 77 additions and 30 deletions

View File

@ -27,7 +27,7 @@ import (
"github.com/ethereum/go-ethereum/params"
)
//go:generate gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go
//go:generate go run github.com/fjl/gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go
type DifficultyTest struct {
ParentTimestamp uint64 `json:"parentTimestamp"`