mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
🥶 Glorify go in the light of golint tool
This commit is contained in:
parent
696fb7095e
commit
1f2eaecfd8
6
ants.go
6
ants.go
@ -38,8 +38,14 @@ const (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// Error types for the Ants API.
|
// Error types for the Ants API.
|
||||||
|
|
||||||
|
// ErrInvalidPoolSize will be returned when setting a negative number as pool capacity.
|
||||||
ErrInvalidPoolSize = errors.New("invalid size for pool")
|
ErrInvalidPoolSize = errors.New("invalid size for pool")
|
||||||
|
|
||||||
|
// ErrInvalidPoolExpiry will be returned when setting a negative number as the periodic duration to purge goroutines.
|
||||||
ErrInvalidPoolExpiry = errors.New("invalid expiry for pool")
|
ErrInvalidPoolExpiry = errors.New("invalid expiry for pool")
|
||||||
|
|
||||||
|
// ErrPoolClosed will be returned when submitting task to a closed pool.
|
||||||
ErrPoolClosed = errors.New("this pool has been closed")
|
ErrPoolClosed = errors.New("this pool has been closed")
|
||||||
|
|
||||||
// workerChanCap determines whether the channel of a worker should be a buffered channel
|
// workerChanCap determines whether the channel of a worker should be a buffered channel
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user