Documentation
¶
Overview ¶
Package pool provides an example usage of unmarshalling JSON into a struct using sync.Pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pools ¶
Pools is a collection of *sync.Pool objects.
func NewPools ¶
func NewPools() *Pools
NewPools returns a new *Pools with the *sync.Pool objects initialized.
func (*Pools) UnmarshalObject ¶
UnmarshalObject writes jsonString into a *bytes.Buffer using sync.Pool and unmarshals the buffer into a *base.Object. It then returns the dereferenced base.Object. The *base.Object is also obtained using sync.Pool.
Click to show internal directories.
Click to hide internal directories.