Refactor validator client help. (#13401)

* Define `cli.App` without mutation.

No functional change.

* `usage.go`:  Clean `appHelpTemplate`.

No functional change is added.
Modifications consist in adding prefix/suffix `-` to improve readability of
the template without adding new lines in template inference.

We now see some inconsistencies of the template:
- `if .App.Version` is around the `AUTHOR` section.
- `if .App.Copyright` is around both `COPYRIGHT` and `VERSION` sections.
- `if len .App.Authors` is around nothing.

* `usage.go`: Surround version and author correctly.

* `usage.go`: `AUTHOR` ==> `AUTHORS`

* `usage.go`: `GLOBAL` --> `global`.

* `--grpc-max-msg-size`: Remove double default.

* VC: Standardize help message.

- Flags help begin with a capital letter and end with a period.
- If a flag help begins with a verb, it is conjugated.
- Expermitemtal, danger etc... mentions are between parenthesis.

* VC help message: Wrap too long lines.
This commit is contained in:
Manu NALEPA
2024-01-02 19:02:28 +01:00
committed by GitHub
parent a602acf492
commit 886d76fe7c
14 changed files with 232 additions and 221 deletions

View File

@@ -14,7 +14,7 @@ var log = logrus.WithField("prefix", "db")
var Commands = &cli.Command{
Name: "db",
Category: "db",
Usage: "defines commands for interacting with the Ethereum Beacon Node database",
Usage: "Defines commands for interacting with the Ethereum Beacon Node database",
Subcommands: []*cli.Command{
{
Name: "restore",

View File

@@ -80,7 +80,7 @@ var (
// MonitoringPortFlag defines the http port used to serve prometheus metrics.
MonitoringPortFlag = &cli.IntFlag{
Name: "monitoring-port",
Usage: "Port used to listening and respond metrics for prometheus.",
Usage: "Port used to listening and respond metrics for Prometheus.",
Value: 8080,
}
// CertFlag defines a flag for the node's TLS certificate.