mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "rlp/rlpgen: remove build tag (#28106)"
This reverts commit ec2a2276b2.
This commit is contained in:
parent
302a55669d
commit
b2f8d19976
5 changed files with 17 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
// Code generated by rlpgen. DO NOT EDIT.
|
||||
|
||||
//go:build !norlpgen
|
||||
// +build !norlpgen
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
// Code generated by rlpgen. DO NOT EDIT.
|
||||
|
||||
//go:build !norlpgen
|
||||
// +build !norlpgen
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
// Code generated by rlpgen. DO NOT EDIT.
|
||||
|
||||
//go:build !norlpgen
|
||||
// +build !norlpgen
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
// Code generated by rlpgen. DO NOT EDIT.
|
||||
|
||||
//go:build !norlpgen
|
||||
// +build !norlpgen
|
||||
|
||||
package types
|
||||
|
||||
import "github.com/ethereum/go-ethereum/rlp"
|
||||
|
|
|
|||
|
|
@ -73,8 +73,9 @@ type Config struct {
|
|||
func (cfg *Config) process() (code []byte, err error) {
|
||||
// Load packages.
|
||||
pcfg := &packages.Config{
|
||||
Mode: packages.NeedName | packages.NeedTypes,
|
||||
Dir: cfg.Dir,
|
||||
Mode: packages.NeedName | packages.NeedTypes | packages.NeedImports | packages.NeedDeps,
|
||||
Dir: cfg.Dir,
|
||||
BuildFlags: []string{"-tags", "norlpgen"},
|
||||
}
|
||||
ps, err := packages.Load(pcfg, pathOfPackageRLP, ".")
|
||||
if err != nil {
|
||||
|
|
@ -116,6 +117,8 @@ func (cfg *Config) process() (code []byte, err error) {
|
|||
// This is done here to avoid processing these lines with gofmt.
|
||||
var header bytes.Buffer
|
||||
fmt.Fprint(&header, "// Code generated by rlpgen. DO NOT EDIT.\n\n")
|
||||
fmt.Fprint(&header, "//go:build !norlpgen\n")
|
||||
fmt.Fprint(&header, "// +build !norlpgen\n\n")
|
||||
return append(header.Bytes(), code...), nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue