Skip to content

Commit

Permalink
🎨 Style: Fix 5 stock string style
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywuC committed Jul 26, 2021
1 parent c08b1ed commit 86fab0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func InitSchedule() {
c := cron.New()
c.AddFunc("0 3 7 * * 1-5", setDailyLegalPerson)
c.AddFunc("0 1 7 * * 1-5", setDailyLegalPerson)
c.Start()
}

Expand Down
5 changes: 3 additions & 2 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"log"
"math/big"
"strconv"

Expand Down Expand Up @@ -81,7 +82,7 @@ func convertQuote(data fugle.Data) string {
percent = currentPirce.Sub(data.Meta.PriceReference).Div(data.Meta.PriceReference).Mul(hunded).BigFloat()
minus = currentPirce.Sub(data.Meta.PriceReference).BigFloat()
var bestPrices string

log.Print(data.Quote.Order)
if len(data.Quote.Order.Bestbids) > 0 || len(data.Quote.Order.Bestasks) > 0 {
for i := 4; i >= 0; i-- {
bidPrice := ""
Expand All @@ -105,7 +106,7 @@ func convertQuote(data fugle.Data) string {
}
askUnit = strconv.Itoa(bestasks.Unit)
}
if i == 5-j {
if i == 4-j {
bestPrices += fmt.Sprintf("%6s %5s \\| %6s %5s\n", bidPrice, bidUnit, askPrice, askUnit)
}
}
Expand Down

0 comments on commit 86fab0c

Please sign in to comment.