From 37cedb0118b83cac8b0bc09c4abda0482990f85a Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 15 Oct 2020 09:54:52 +0200 Subject: [PATCH] cmd/pool: allow ratings nodekey without named flag --- cmd/pool/auction.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/pool/auction.go b/cmd/pool/auction.go index 8bff8c7..3cb76c3 100644 --- a/cmd/pool/auction.go +++ b/cmd/pool/auction.go @@ -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") }