Skip to content

Commit e530bd0

Browse files
authored
fix: sentence-style usage strings (#713)
* fix: sentence-style usage strings * docs: make gen-doc
1 parent c410f6e commit e530bd0

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

cmd/dumpblocks/dumpblocks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func init() {
193193
f.StringVarP(&inputDumpblocks.Filename, "filename", "f", "", "where to write the output to (default stdout)")
194194
f.StringVarP(&inputDumpblocks.Mode, "mode", "m", "json", "the output format [json, proto]")
195195
f.Uint64VarP(&inputDumpblocks.BatchSize, "batch-size", "b", 150, "batch size for requests (most providers cap at 1000)")
196-
f.StringVarP(&inputDumpblocks.FilterStr, "filter", "F", "{}", "filter output based on tx to and from, not setting a filter means all are allowed")
196+
f.StringVarP(&inputDumpblocks.FilterStr, "filter", "F", "{}", "filter output based on tx to and from (not setting a filter means all are allowed)")
197197
}
198198

199199
func checkFlags() error {

cmd/p2p/sensor/sensor.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,14 @@ func init() {
430430
}
431431
f.IntVarP(&inputSensorParams.MaxPeers, "max-peers", "m", 2000, "maximum number of peers to connect to")
432432
f.IntVarP(&inputSensorParams.MaxDatabaseConcurrency, "max-db-concurrency", "D", 10000,
433-
`maximum number of concurrent database operations to perform. Increasing this
434-
will result in less chance of missing data (i.e. broken pipes) but can
435-
significantly increase memory usage`)
433+
`maximum number of concurrent database operations to perform (increasing this
434+
will result in less chance of missing data but can significantly increase memory usage)`)
436435
f.BoolVarP(&inputSensorParams.ShouldWriteBlocks, "write-blocks", "B", true, "write blocks to database")
437436
f.BoolVar(&inputSensorParams.ShouldWriteBlockEvents, "write-block-events", true, "write block events to database")
438437
f.BoolVarP(&inputSensorParams.ShouldWriteTransactions, "write-txs", "t", true,
439-
`write transactions to database. This option can significantly increase CPU and memory usage`)
438+
`write transactions to database (this option can significantly increase CPU and memory usage)`)
440439
f.BoolVar(&inputSensorParams.ShouldWriteTransactionEvents, "write-tx-events", true,
441-
`write transaction events to database. This option can significantly increase CPU and memory usage`)
440+
`write transaction events to database (this option can significantly increase CPU and memory usage)`)
442441
f.BoolVar(&inputSensorParams.ShouldWritePeers, "write-peers", true, "write peers to database")
443442
f.BoolVar(&inputSensorParams.ShouldRunPprof, "pprof", false, "run pprof server")
444443
f.UintVar(&inputSensorParams.PprofPort, "pprof-port", 6060, "port pprof runs on")
@@ -455,8 +454,7 @@ significantly increase memory usage`)
455454
f.StringVar(&inputSensorParams.GenesisHash, "genesis-hash", "0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b", "genesis block hash")
456455
f.BytesHexVar(&inputSensorParams.ForkID, "fork-id", []byte{240, 151, 188, 19}, "hex encoded fork ID (omit 0x)")
457456
f.IntVar(&inputSensorParams.DialRatio, "dial-ratio", 0,
458-
`ratio of inbound to dialed connections. A dial ratio of 2 allows 1/2 of
459-
connections to be dialed. Setting this to 0 defaults it to 3`)
457+
`ratio of inbound to dialed connections (dial ratio of 2 allows 1/2 of connections to be dialed, setting to 0 defaults to 3)`)
460458
f.StringVar(&inputSensorParams.NAT, "nat", "any", "NAT port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>)")
461459
f.StringVar(&inputSensorParams.StaticNodesFile, "static-nodes", "", "static nodes file")
462460
f.StringVar(&inputSensorParams.TrustedNodesFile, "trusted-nodes", "", "trusted nodes file")

doc/polycli_dumpblocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ To solve this, add the unknown fields to the `.proto` files and recompile them (
7979
-B, --dump-blocks dump blocks to output (default true)
8080
--dump-receipts dump receipts to output (default true)
8181
-f, --filename string where to write the output to (default stdout)
82-
-F, --filter string filter output based on tx to and from, not setting a filter means all are allowed (default "{}")
82+
-F, --filter string filter output based on tx to and from (not setting a filter means all are allowed) (default "{}")
8383
-h, --help help for dumpblocks
8484
-m, --mode string the output format [json, proto] (default "json")
8585
-r, --rpc-url string the RPC endpoint URL (default "http://localhost:8545")

doc/polycli_p2p_sensor.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,16 @@ If no nodes.json file exists, it will be created.
3030
- json (output to stdout)
3131
- none (no persistence) (default "none")
3232
-d, --database-id string datastore database ID
33-
--dial-ratio int ratio of inbound to dialed connections. A dial ratio of 2 allows 1/2 of
34-
connections to be dialed. Setting this to 0 defaults it to 3
33+
--dial-ratio int ratio of inbound to dialed connections (dial ratio of 2 allows 1/2 of connections to be dialed, setting to 0 defaults to 3)
3534
--discovery-dns string DNS discovery ENR tree URL
3635
--discovery-port int UDP P2P discovery port (default 30303)
3736
--fork-id bytesHex hex encoded fork ID (omit 0x) (default F097BC13)
3837
--genesis-hash string genesis block hash (default "0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b")
3938
-h, --help help for sensor
4039
--key string hex-encoded private key (cannot be set with --key-file)
4140
-k, --key-file string private key file (cannot be set with --key)
42-
-D, --max-db-concurrency int maximum number of concurrent database operations to perform. Increasing this
43-
will result in less chance of missing data (i.e. broken pipes) but can
44-
significantly increase memory usage (default 10000)
41+
-D, --max-db-concurrency int maximum number of concurrent database operations to perform (increasing this
42+
will result in less chance of missing data but can significantly increase memory usage) (default 10000)
4543
-m, --max-peers int maximum number of peers to connect to (default 2000)
4644
--nat string NAT port mapping mechanism (any|none|upnp|pmp|pmp:<IP>|extip:<IP>) (default "any")
4745
-n, --network-id uint filter discovered nodes by this network ID
@@ -61,8 +59,8 @@ If no nodes.json file exists, it will be created.
6159
--write-block-events write block events to database (default true)
6260
-B, --write-blocks write blocks to database (default true)
6361
--write-peers write peers to database (default true)
64-
--write-tx-events write transaction events to database. This option can significantly increase CPU and memory usage (default true)
65-
-t, --write-txs write transactions to database. This option can significantly increase CPU and memory usage (default true)
62+
--write-tx-events write transaction events to database (this option can significantly increase CPU and memory usage) (default true)
63+
-t, --write-txs write transactions to database (this option can significantly increase CPU and memory usage) (default true)
6664
```
6765

6866
The command also inherits flags from parent commands.

0 commit comments

Comments
 (0)