From c9f7146669c4ce198d1e2bd7e9498b99e2aaa58d Mon Sep 17 00:00:00 2001 From: Ashley C Date: Sat, 15 May 2021 07:51:17 +0100 Subject: [PATCH] Fix lint warning --- bot/normal/normal.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bot/normal/normal.go b/bot/normal/normal.go index 20e950f..e65c4eb 100644 --- a/bot/normal/normal.go +++ b/bot/normal/normal.go @@ -427,17 +427,17 @@ func (b *Bot) checkInitialMargin() error { avail := int64(float64(b.balanceGeneral) * b.strategy.OrdersFraction) cost := int64(float64(shapeMarginCost)) if avail < cost { - var missing_percent string + var missingPercent string if avail == 0 { - missing_percent = "Inf" + missingPercent = "Inf" } else { - missing_percent = fmt.Sprintf("%.2f%%", float32((cost-avail)*100)/float32(avail)) + missingPercent = fmt.Sprintf("%.2f%%", float32((cost-avail)*100)/float32(avail)) } b.log.WithFields(log.Fields{ - "available": avail, - "cost": cost, - "missing": avail - cost, - "missing_percent": missing_percent, + "available": avail, + "cost": cost, + "missing": avail - cost, + "missingPercent": missingPercent, }).Error("Not enough collateral to safely keep orders up given current price, risk parameters and supplied default shapes.") return errors.New("not enough collateral") }