Compare commits

..

4 Commits

Author SHA1 Message Date
Lan Phan
74946b8798
Merge 0a0620b870 into 80430fec46 2024-09-14 15:59:25 +00:00
Lan Phan
0a0620b870 add new tag unprintable to prevent printing specific field 2024-09-14 22:58:43 +07:00
c9s
80430fec46
Merge pull request #1744 from lanphan/activeorder
Some checks are pending
Go / build (1.21, 6.2) (push) Waiting to run
golang-lint / lint (push) Waiting to run
2024-09-14 23:19:10 +08:00
Lan Phan
1f8b2b3710 call b.EmitNew() when new order is added into activeorderbook 2024-09-14 18:26:36 +07:00
2 changed files with 5 additions and 4 deletions

View File

@ -359,6 +359,7 @@ func (b *ActiveOrderBook) Add(orders ...types.Order) {
}
b.add(order)
b.EmitNew(order)
}
}

View File

@ -91,8 +91,8 @@ func PrintConfig(s interface{}, f io.Writer, style *table.Style, withColor bool,
continue
}
if jtag := tt.Tag.Get("json"); jtag != "" && jtag != "-" {
disableConfigPrint := tt.Tag.Get("disableConfigPrint")
if disableConfigPrint == "true" {
unprintable := tt.Tag.Get("unprintable")
if unprintable == "true" {
continue
}
name := strings.Split(jtag, ",")[0]
@ -110,8 +110,8 @@ func PrintConfig(s interface{}, f io.Writer, style *table.Style, withColor bool,
}
default:
name := strings.Split(jsonTag, ",")[0]
disableConfigPrint := t.Tag.Get("disableConfigPrint")
if disableConfigPrint == "true" {
unprintable := t.Tag.Get("unprintable")
if unprintable == "true" {
continue
}
if _, ok := redundantSet[name]; ok {