diff --git a/builder.go b/builder.go index e90678b..b130769 100644 --- a/builder.go +++ b/builder.go @@ -96,9 +96,9 @@ func (b *Builder) Reset() { } // Metric acquires and returns a zeroed-out [Builder] instance from the -// [DefaultBuilderPool] and sets the metric's name. +// default builder pool and sets the metric's name. func Metric(name string, options ...BuilderOption) *Builder { - return DefaultBuilderPool.Metric(name, options...) + return defaultBuilderPool.Metric(name, options...) } // Metric sets the metric's name of the [Builder]. diff --git a/builder_pool.go b/builder_pool.go index 3af3047..75e37c6 100644 --- a/builder_pool.go +++ b/builder_pool.go @@ -8,7 +8,7 @@ const ( ) var ( - DefaultBuilderPool = NewBuilderPool() + defaultBuilderPool = NewBuilderPool() ) // NewBuilderPool creates a new [BuilderPool] instance. @@ -38,12 +38,12 @@ func (p *BuilderPool) Acquire() *Builder { return p.pool.Get().(*Builder) } -// AcquireBuilder returns an empty [Builder] instance from the [DefaultBuilderPool]. +// AcquireBuilder returns an empty [Builder] instance from the default builder pool. // // Release the [Builder] with [ReleaseBuilder] after the [Builder] is no longer needed. // This allows reducing GC load. func AcquireBuilder() *Builder { - return DefaultBuilderPool.Acquire() + return defaultBuilderPool.Acquire() } // Release releases the [Builder] acquired via [BuilderPool.Acquire] to the specified pool. @@ -55,12 +55,12 @@ func (p *BuilderPool) Release(b *Builder) { p.pool.Put(b) } -// Release releases the [Builder] acquired via [AcquireBuilder] to the [DefaultBuilderPool]. +// Release releases the [Builder] acquired via [AcquireBuilder] to the default builder pool. // // The released [Builder] mustn't be used after releasing it, otherwise data races // may occur. func ReleaseBuilder(b *Builder) { - DefaultBuilderPool.Release(b) + defaultBuilderPool.Release(b) } // Metric acquires and returns a zeroed-out [Builder] instance from the