This commit is contained in:
Kevin Cotugno 2018-01-01 23:26:31 -08:00
parent fdc02440fe
commit 171b6ae5d6
2 changed files with 6 additions and 7 deletions

View File

@ -24,7 +24,7 @@ const (
)
type Terminal struct {
Event <-chan Event
Event <-chan Event
SizeChange <-chan image.Point
in *os.File

View File

@ -6,8 +6,8 @@ import (
"image"
"log"
"time"
"sync"
"time"
"unicode/utf8"
)
@ -28,9 +28,9 @@ var midPrice *exhibit.ListWidget
var history *exhibit.ListWidget
var numLock sync.Mutex
var num int
var num int
var sizeLock sync.Mutex
var sizeLock sync.Mutex
var sizeChanged bool
var low, high decimal.Decimal
@ -68,7 +68,7 @@ func main() {
}
go func() {
Loop:
Loop:
for e := range terminal.Event {
switch e {
case exhibit.Eventq:
@ -254,8 +254,7 @@ func updateAsks(entries []Entries) {
price, size := flatten(entry)
topAsks.AddEntry(ListEntry{Value: fmtObEntry(price, size),
Attrs: exhibit.Attributes{ForegroundColor:
exhibit.FGRed}})
Attrs: exhibit.Attributes{ForegroundColor: exhibit.FGRed}})
if i == 0 {
low = price