mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-13 12:33:04 +02:00
Merge pull request #107 from halseth/node-key-cli-arg
cmd/pool: allow ratings nodekey without named flag
This commit is contained in:
commit
90a74b34ff
1 changed files with 9 additions and 1 deletions
|
|
@ -287,7 +287,15 @@ func ratings(ctx *cli.Context) error {
|
|||
}
|
||||
defer cleanup()
|
||||
|
||||
nodeKey := ctx.String("node_key")
|
||||
var nodeKey string
|
||||
switch {
|
||||
case ctx.Args().Present():
|
||||
nodeKey = ctx.Args().First()
|
||||
|
||||
default:
|
||||
nodeKey = ctx.String("node_key")
|
||||
}
|
||||
|
||||
if nodeKey == "" {
|
||||
return fmt.Errorf("an LN node key must be provided")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue