Migration: go 1.18
This commit is contained in:
@ -71,12 +71,12 @@ func (pc *PoolConn) Close() error {
|
||||
|
||||
func NewPool(factory func(context.Context) (*Snell, error)) *Pool {
|
||||
p := pool.New(
|
||||
func(ctx context.Context) (interface{}, error) {
|
||||
func(ctx context.Context) (any, error) {
|
||||
return factory(ctx)
|
||||
},
|
||||
pool.WithAge(15000),
|
||||
pool.WithSize(10),
|
||||
pool.WithEvict(func(item interface{}) {
|
||||
pool.WithEvict(func(item any) {
|
||||
item.(*Snell).Close()
|
||||
}),
|
||||
)
|
||||
|
Reference in New Issue
Block a user