Registry /
utility / jolestar-go-commons-pool
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pool
✓ github.com/jolestar/go-commons-pool
Basic object pool usage
package main
import (
"fmt"
"github.com/jolestar/go-commons-pool"
)
func main() {
factory := pool.NewPooledObjectFactorySimple(
func() (interface{}, error) { return "object", nil },
)
p := pool.NewObjectPool(factory)
obj, _ := p.BorrowObject()
fmt.Println(obj)
p.ReturnObject(obj)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
2.0.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.