Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 646 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 646 Bytes

pools GoDoc wercker status

pools is a go package for managing a suite of differently sized slices of objects backed by sync.Pool

Usage

Usage is almost identical to sync.Pool:

var s pools.Suite
s.New = func() interface{} {
	return MyObject{}
}
slice := s.Get(100) // returns a []MyObject of length 100
s.Put(slice) // put it back in the appropriate pool