Compare commits

..

2 Commits

Author SHA1 Message Date
Lan Phan
6466c1e956
Merge 825b91f274 into 25a2203000 2024-09-13 19:54:29 +07:00
Lan Phan
825b91f274 add new tag disableConfigPrint to prevent printing specific field 2024-09-13 15:31:51 +07:00
2 changed files with 4 additions and 5 deletions

View File

@ -359,7 +359,6 @@ 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 != "-" {
unprintable := tt.Tag.Get("unprintable")
if unprintable == "true" {
disableConfigPrint := tt.Tag.Get("disableConfigPrint")
if disableConfigPrint == "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]
unprintable := t.Tag.Get("unprintable")
if unprintable == "true" {
disableConfigPrint := t.Tag.Get("disableConfigPrint")
if disableConfigPrint == "true" {
continue
}
if _, ok := redundantSet[name]; ok {