-
Notifications
You must be signed in to change notification settings - Fork 20.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/utils: Disallow --lightserv in light mode #15514
Conversation
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, just a couple of polishes and it's good to go.
cmd/utils/flags.go
Outdated
if ctx.GlobalIsSet(flag.GetName()) { | ||
set = append(set, "--"+flag.GetName()) | ||
for i, arg := range args { | ||
if flag, ok := arg.(cli.Flag); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion, instead of nesting when the condition holds, let's continue
when it doens't hold. This reduces the nesting depth of the entire code by one level:
flag, ok := arg.(cli.Flag)
if !ok {
continue;
}
cmd/utils/flags.go
Outdated
set = append(set, `"--`+flag.GetName()+` `+option+`"`) | ||
} | ||
default: | ||
Fatalf("Received wrong type in checkExclusive") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a panic here would be better. It shouts louder that something was coded wrong:
panic("unsupported flag argument type")
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
Thank you for your contribution! Your commits seem to not adhere to the repository coding standards
Please check the contribution guidelines for more details. This message was auto-generated by https://gitcop.com |
This change appears to disallow all use of
Due to the change here: go-ethereum/cmd/utils/flags.go Line 986 in e4c9fd2
Since |
#15492