format codes

This commit is contained in:
andy pan 2018-07-06 15:00:30 +08:00
parent b21f63142d
commit afba560448
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ func NewPool(size, expiry int) (*Pool, error) {
capacity: int32(size), capacity: int32(size),
freeSignal: make(chan sig, math.MaxInt32), freeSignal: make(chan sig, math.MaxInt32),
release: make(chan sig, 1), release: make(chan sig, 1),
expiryDuration: time.Duration(expiry)*time.Second, expiryDuration: time.Duration(expiry) * time.Second,
} }
p.monitorAndClear() p.monitorAndClear()
return p, nil return p, nil

View File

@ -96,7 +96,7 @@ func NewPoolWithFunc(size, expiry int, f pf) (*PoolWithFunc, error) {
capacity: int32(size), capacity: int32(size),
freeSignal: make(chan sig, math.MaxInt32), freeSignal: make(chan sig, math.MaxInt32),
release: make(chan sig, 1), release: make(chan sig, 1),
expiryDuration: time.Duration(expiry)*time.Second, expiryDuration: time.Duration(expiry) * time.Second,
poolFunc: f, poolFunc: f,
} }
p.MonitorAndClear() p.MonitorAndClear()