mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 17:30:44 +00:00
internal/flags: fix flag redefined bug for cli v2 aliases (#30796)
This commit is contained in:
parent
dcab7e8efb
commit
b883b0b593
1 changed files with 3 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ func (f *DirectoryFlag) String() string { return cli.FlagStringer(f) }
|
||||||
// and adds variable to flag set for parsing.
|
// and adds variable to flag set for parsing.
|
||||||
func (f *DirectoryFlag) Apply(set *flag.FlagSet) error {
|
func (f *DirectoryFlag) Apply(set *flag.FlagSet) error {
|
||||||
eachName(f, func(name string) {
|
eachName(f, func(name string) {
|
||||||
set.Var(&f.Value, f.Name, f.Usage)
|
set.Var(&f.Value, name, f.Usage)
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -166,7 +166,7 @@ func (f *TextMarshalerFlag) String() string { return cli.FlagStringer(f) }
|
||||||
|
|
||||||
func (f *TextMarshalerFlag) Apply(set *flag.FlagSet) error {
|
func (f *TextMarshalerFlag) Apply(set *flag.FlagSet) error {
|
||||||
eachName(f, func(name string) {
|
eachName(f, func(name string) {
|
||||||
set.Var(textMarshalerVal{f.Value}, f.Name, f.Usage)
|
set.Var(textMarshalerVal{f.Value}, name, f.Usage)
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ func (f *BigFlag) String() string { return cli.FlagStringer(f) }
|
||||||
func (f *BigFlag) Apply(set *flag.FlagSet) error {
|
func (f *BigFlag) Apply(set *flag.FlagSet) error {
|
||||||
eachName(f, func(name string) {
|
eachName(f, func(name string) {
|
||||||
f.Value = new(big.Int)
|
f.Value = new(big.Int)
|
||||||
set.Var((*bigValue)(f.Value), f.Name, f.Usage)
|
set.Var((*bigValue)(f.Value), name, f.Usage)
|
||||||
})
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue