1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package commands type ClientSession struct{ Queue [][]string InTransaction bool } func NewClientSession() *ClientSession { return &ClientSession{ InTransaction: false, Queue: make([][]string, 0), } } func (s *ClientSession) Reset() { s.InTransaction = false s.Queue = nil }