qbtrade/pkg/strategy/drift/output.go

19 lines
435 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
package drift
import (
"io"
"github.com/jedib0t/go-pretty/v6/table"
"git.qtrade.icu/lychiyu/qbtrade/pkg/dynamic"
"git.qtrade.icu/lychiyu/qbtrade/pkg/style"
)
func (s *Strategy) Print(f io.Writer, pretty bool, withColor ...bool) {
var tableStyle *table.Style
if pretty {
tableStyle = style.NewDefaultTableStyle()
}
dynamic.PrintConfig(s, f, tableStyle, len(withColor) > 0 && withColor[0], dynamic.DefaultWhiteList()...)
}