Documentation
¶
Overview ¶
Package builderpool is a small wrapper of sync.Pool which is specified one to strings.Builder. Go 1.10 or later is required to use this package because the strings.Buidler is introduced with Go 1.10.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuilderPool ¶
type BuilderPool struct {
// contains filtered or unexported fields
}
BuilderPool is wrapper struct of sync.Pool for strings.Builder objects.
func (*BuilderPool) Get ¶
func (bp *BuilderPool) Get() *strings.Builder
Get returns a strings.Builder from the pool.
func (*BuilderPool) Release ¶
func (bp *BuilderPool) Release(builder *strings.Builder)
Release puts the given strings.Builder back into the pool after resetting the builder.
Click to show internal directories.
Click to hide internal directories.