bbgo: add stringer method to the quota struct
This commit is contained in:
parent
b99f49c8b8
commit
0b572aa967
|
@ -51,6 +51,13 @@ func (q *Quota) Rollback() {
|
||||||
q.mu.Unlock()
|
q.mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (q *Quota) String() string {
|
||||||
|
q.mu.Lock()
|
||||||
|
defer q.mu.Unlock()
|
||||||
|
|
||||||
|
return q.Locked.String() + "/" + q.Available.String()
|
||||||
|
}
|
||||||
|
|
||||||
// QuotaTransaction is a transactional quota manager
|
// QuotaTransaction is a transactional quota manager
|
||||||
type QuotaTransaction struct {
|
type QuotaTransaction struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
|
|
Loading…
Reference in New Issue
Block a user