Documentation ¶
Index ¶
- type Pool
- func (p *Pool) Add(t reflect.Type)
- func (p *Pool) Bool(b bool) *bool
- func (p *Pool) Complex128(c complex128) *complex128
- func (p *Pool) Complex64(c complex64) *complex64
- func (p *Pool) Float32(f float32) *float32
- func (p *Pool) Float64(f float64) *float64
- func (p *Pool) Get(t reflect.Type) interface{}
- func (p *Pool) Int(i int) *int
- func (p *Pool) Int16(i int16) *int16
- func (p *Pool) Int32(i int32) *int32
- func (p *Pool) Int64(i int64) *int64
- func (p *Pool) Int8(i int8) *int8
- func (p *Pool) Put(x interface{})
- func (p *Pool) String(s string) *string
- func (p *Pool) Uint(u uint) *uint
- func (p *Pool) Uint16(u uint16) *uint16
- func (p *Pool) Uint32(u uint32) *uint32
- func (p *Pool) Uint64(u uint64) *uint64
- func (p *Pool) Uint8(u uint8) *uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool provides a sync.Pool where GC'd objects are put back into the Pool automatically.
func (*Pool) Add ¶
Add adds support for the type returned by f(). f() must create a new instance of a pointer to a struct, map or slice value. Calling this after the first call to Get() or Put() is a race condition.
func (*Pool) Complex128 ¶
func (p *Pool) Complex128(c complex128) *complex128
Click to show internal directories.
Click to hide internal directories.