multi: fix most obvious linter errors

This commit is contained in:
Oliver Gugger 2019-10-07 17:29:24 +02:00
parent 1cdb233a00
commit 36838cf7f4
No known key found for this signature in database
GPG key ID: 8E4256593F177720
21 changed files with 41 additions and 50 deletions

View file

@ -41,8 +41,7 @@ func loopIn(ctx *cli.Context) error {
args = args.Tail()
default:
// Show command help if no arguments and flags were provided.
cli.ShowCommandHelp(ctx, "in")
return nil
return cli.ShowCommandHelp(ctx, "in")
}
amt, err := parseAmt(amtStr)

View file

@ -59,8 +59,7 @@ func loopOut(ctx *cli.Context) error {
args = args.Tail()
default:
// Show command help if no arguments and flags were provided.
cli.ShowCommandHelp(ctx, "out")
return nil
return cli.ShowCommandHelp(ctx, "out")
}
amt, err := parseAmt(amtStr)

View file

@ -97,7 +97,7 @@ type limits struct {
}
func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits {
maxSwapRoutingFee := getMaxRoutingFee(btcutil.Amount(amt))
maxSwapRoutingFee := getMaxRoutingFee(amt)
maxPrepayRoutingFee := getMaxRoutingFee(btcutil.Amount(
quote.PrepayAmt,
))
@ -126,7 +126,7 @@ func displayLimits(swapType loop.Type, amt btcutil.Amount, l *limits,
if l.maxPrepayRoutingFee != nil {
totalSuccessMax += *l.maxPrepayRoutingFee
}
if swapType == loop.TypeIn && externalHtlc {
fmt.Printf("On-chain fee for external loop in is not " +
"included.\nSufficient fees will need to be paid " +
@ -135,7 +135,7 @@ func displayLimits(swapType loop.Type, amt btcutil.Amount, l *limits,
}
fmt.Printf("Max swap fees for %d Loop %v: %d\n",
btcutil.Amount(amt), swapType, totalSuccessMax,
amt, swapType, totalSuccessMax,
)
fmt.Printf("CONTINUE SWAP? (y/n), expand fee detail (x): ")

View file

@ -28,8 +28,7 @@ func quote(ctx *cli.Context) error {
// Show command help if the incorrect number arguments and/or flags were
// provided.
if ctx.NArg() != 1 || ctx.NumFlags() > 1 {
cli.ShowCommandHelp(ctx, "quote")
return nil
return cli.ShowCommandHelp(ctx, "quote")
}
args := ctx.Args()