Esempio n. 1
0
func (m *Message) String() string {
	if m == nil {
		return "<nil>"
	}
	price := fstrconv.ItoaDelim(int64(m.Price), ',')
	amount := fstrconv.ItoaDelim(int64(m.Amount), ',')
	traderId := fstrconv.ItoaDelim(int64(m.TraderId), ' ')
	tradeId := fstrconv.ItoaDelim(int64(m.TradeId), ' ')
	stockId := fstrconv.ItoaDelim(int64(m.StockId), ' ')
	return fmt.Sprintf("%v, price %s, amount %s, trader %s, trade %s, stock %s", m.Kind, price, amount, traderId, tradeId, stockId)
}
Esempio n. 2
0
func (o *OrderNode) String() string {
	if o == nil {
		return "<nil>"
	}
	price := fstrconv.ItoaDelim(int64(o.Price()), ',')
	amount := fstrconv.ItoaDelim(int64(o.Amount()), ',')
	traderId := fstrconv.ItoaDelim(int64(o.TraderId()), '-')
	tradeId := fstrconv.ItoaDelim(int64(o.TradeId()), '-')
	stockId := fstrconv.ItoaDelim(int64(o.StockId()), '-')
	kind := o.kind
	return fmt.Sprintf("%v, price %s, amount %s, trader %s, trade %s, stock %s", kind, price, amount, traderId, tradeId, stockId)
}